Drawing 3D heatmap surface based a set of vertices

I would like to draw a 3D heat map (Heat map - Wikipedia) surface based a set of vertices. Since I am a newbie in 3D and OpenGL programming, please verify my solution

  1. To draw the 3D surface, draw a series of triangles (GL_TRIANGLE_STRIP) by specifying a number of 3D vertices. Smoothing is not required.
  2. For heat map, change the color of a vertex based on z value.

Thank you.

Or you could even put the heatmap on a texture and draw a quad with the texture on it.

So you want both the height and the color of each vertex to vary based on your data value?

You have a number of choices.

You could recreate your 3D object each time you draw it, and specify the z value and the color varying both based on your input data.

You could also create you 3D image using your input value as the z value, as you have said. You could then create a one dimensional texture that maps height values to color values, using glTexGen.

I haven’t done this yet, but I recently read a paper on something called ChromaDepth that spells out in some detail how to do this. See this link for more information:

ChromaDepth paper

Y-tension and Duncan Champney, thank you for your reply