Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculating the contours of a 3D heightmap?

I am looking for a function or example to produce a list of lines representing contours at a specific height within a heightmap.

Eg,

Lines[] = GetContours(Heights[512,512], HeightValue) 

Where Heights is a 512x512 array of floating point values, HeightValue is the height at which the contour should be drawn. Heights may contain multiple lines for that specific height (eg a Saddle, or island chain)

Does anyone have or know where to get an algorithm to generate this?

like image 685
Adam Frisby Avatar asked Apr 18 '09 08:04

Adam Frisby


1 Answers

What you're actually trying to do is to draw an iso-line.
see my question about it a while ago.
The link given in one of the answers was very helpful.

like image 117
shoosh Avatar answered Oct 05 '22 04:10

shoosh