marceloc

06-05-2007, 06:44 PM

Hello,

I am physicist doing computational modeling. Over the years I have learned to code by "imitating" examples that people gave me or that I found online. I am reasonably confident using basic OpenGL, until it comes to drawing smooth surfaces, where I become quickly lost.

I have to display a 3D smooth surface for which I have 3D points describing it, arranged such that XY come in a NxM grid, and then Z is the height for each XY point.

I have been reading about polygons and face and vertex normals, but I am really at a loss as to what algorythms to use to compute vertex normals, and then how to produce a nice and smooth surface.

I have found a few examples online, but in all the normals are given, not computed. I need to compute them on the fly, as my surface changes continuously over the simulation.

Could anyone point to an example code I could again imitate?

Thanks infinitely

I am physicist doing computational modeling. Over the years I have learned to code by "imitating" examples that people gave me or that I found online. I am reasonably confident using basic OpenGL, until it comes to drawing smooth surfaces, where I become quickly lost.

I have to display a 3D smooth surface for which I have 3D points describing it, arranged such that XY come in a NxM grid, and then Z is the height for each XY point.

I have been reading about polygons and face and vertex normals, but I am really at a loss as to what algorythms to use to compute vertex normals, and then how to produce a nice and smooth surface.

I have found a few examples online, but in all the normals are given, not computed. I need to compute them on the fly, as my surface changes continuously over the simulation.

Could anyone point to an example code I could again imitate?

Thanks infinitely