You'll want to use edge detection algorithms to generate a single pixel border around the contained volume. Treat the pixels as a loop of line segements. Then interpolate along your line loop placing those nodes at what ever interval/criteria you choose.
What do you *really* want? Would it work to pick the dot positions first and then draw the curved path through them? Because that's a hell of a lot easier. :)
And do you have to generate a path from scratch? Why not have some kind of data file with a bunch of (r, theta) pairs? You would find the next point by storing the current point position and angle, and for each pair in the data file, update the angle with theta, and move forward r pixels in the new direction.
Does the path need to be a closed loop? Do you need to tweak dot positions so they're evenly spaced around the curve? (If so, does "evenly spaced" refer to straight-line distance, distance following the curve, or something else?) About how many points per curve are we talking about?
And perhaps most important: what do these points and curves actually mean? What is their significance?
With your permission, GameDev.net uses analytics cookies to understand how people use the platform.
You can accept analytics or continue with necessary cookies only.
Learn more