3 ms·
This algorithm is not sufficient. There's no requirement for the contour line to be simple, connected, or even closed within the domain you specify (the higher
by magicalist 13y ago
This algorithm is not sufficient. There's no requirement for the contour line to be simple, connected, or even closed within the domain you specify (the higher the frequency the more likely it will be closed, but the more likely it won't be connected).
One approach would be to then walk the line from the start and connect neighboring points that aren't too close to previous points and don't cause a turn tighter than some given angle (non-simple curves should only happen if you're unlucky enough to run into a saddle point of your desired value), but that solution starts looking a whole lot like taking the convex hull of clusters of random points...you could have just taken fewer points and then smoothed the curve that fits around them :)