Re: Runtime generation of contour lines

New Message Reply Date view Thread view Subject view Author view

Chris Mitchell (chris++at++scotch.physics.ucla.edu)
Fri, 30 Oct 1998 11:00:32 -0800 (PST)


> > Does anybody have any ideas as to how I might generate contour lines at
> > runtime from an exiting terrain model? I have several .flt terrain
> > models that represent non-real-world geography and would like to generate
> > a God's-eye-view model made up of contours for the terrain databases.
> > Any ideas?
>
> Use performer to take uniform distributed, rectangular grid,
> samples of the height with 'pfNodeIsectSegs()'
> Look if you want the height taken from the above or from below if
> you don't want any terrain features to clutter the contourlines.
> With this grid and a contour algorithm for triangle meshes construct
> all the contour lines. There is enough literature about contour
> algorithms. I have used one that was adapted by a collegue of mine.
> When you have the contour lines you can draw them in the draw callback
> as a kind of Head Up Display in the postdraw fase.

As far as the algorithm goes, a fast and free one is provided in
the visualization toolkit, vtk. It also has an inventor output.
I use vtk to generate sufaces at run-time, write the file in inventor
format to a named pipe, and have an async dbase process pick it up
and merge it in the main scene.

Chris Mitchell
UCLA Physics Department
LAPD Plasma Lab
310-206-1772
chrism++at++ucla.edu


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Oct 30 1998 - 11:01:02 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.