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?