Thanks plus another question ...

I have a massive set of line segment data (elevation contours and spot elevations) in which the vertices are defined as two indices into a master vertex array pool. I have successfully displayed the dataset using an octree for view frustum culling (I grab the modelview and projection mats each frame and deduce the view frustum per Mark Morley’s algorithm). All is working fine and I learned how to do it all from you guys so … THANK YOU … THANK YOU VERY MUCH … I couldn’t have done it without such a helpful group of folks.

Now, on to more difficult tasks … I need to convert the line segment data into a surface for doing line-of-sight calculations. I would prefer to end up with a faceted terrain model with which I could apply a quadtree culling algorithm to. The source data, being line segments, is sparse in some areas and I have no clue where to start. Do any of you folks have any knowledge of techniques for doing such a conversion? I realize this is off the GL topic but I didn’t know where else to ask. Thanks (again) in advance …

I think what you are looking for is Delaunay triangulation, which enables you to reconstruct a surface from a set of points.

This method may or may not be suitable for your dataset (I think it will be). Be aware that the maths behind the algorithm is not that easy (duals, convex hulls, … barbarian words !).

Hope this helps !



Wow, thanks! I found a great paper by Paul Bourke on Delaunay Triangulation and I am studying it now. It seems to be exactly what I need.

BTW: Screen snaps from the current version of this project can be found at …

Looking at your dataset, I have to tell you that triangulating it might take some time (i.e. you should do it outside of the main program and have two datasets, one for lines, and one for triangles).