Problem

Hi all,
i am having some data points, for the better appearance i want to show them in the form of 3 dimensional surface . i have interpolated these data points using the rectangular patches and bezier patches. i am able to get the 3 dimensional surface but problem is the color of the 3D surface. I want to divide the surface in to the different zones related to its corresponding value. How can i do that
Any help would be appreciated.

Thanks In Advance

Hi,

The easiest way would be to specify gl.glDisable(GL.GL_LIGHTING); and color them using glColor3f(float,float,float); You can specify the glColor3f function before each glVertex3f (i’ll just assume you’re using vertexes to draw the patches).

Jark

or, if you’re really advanced, you could make a custom fragment shader that uses the values to look up the colors in a pre-built texture. This requires more knowledge about openGL, but it might be easier in the long run than manually assigning colors to each vertex. Plus it allows for cool tricks later because it’s a texture.

Thanks for your suggestions
I want to ask one more question for the represantation of the surface the approach which i’ve taken is correct or not or any other method i can use for surface geneartion for the represantation of the data other than B’ezier rectangular patches