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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With