View Full Version : 3D Mesh based on magnitude

09-17-2006, 08:56 AM
Problem: How to draw a 2D raster as a 3D mesh. Let me explain what I mean by a 3D mesh. Assume I have a 2D array of values that is 100 x 100 in size. Each value in every cell ranges from 0 – 255. 0 being the lowest value with 255 being the highest. Further assume that around the edges of this 2D array all the values are 0 with the value of each cell approaching 255 the closer you get to the center of this 2D array. What I'd like to do is draw a 3D mesh using the magnitude of each cell to determine the Z value of the geometry used to represent the value in a given cell.

Does anyone know of any example code that I can use to learn from, any websites I can read? I've had a lot of college math, algebra, trig, multiple calculus classes, etc. I don't want hand holding, just point me in the right direction.


09-17-2006, 09:35 AM
Would a heightmap terrain do the trick.
In that case just look at these links
These might not tell you exactly how to do it, but you will get the idea.

09-17-2006, 10:40 AM
maybe he mean volume rendering, rendering level surfaces from implicit function ???

i dont know :confused:

did you have a question about opengl ?