I have a user defined path which a user has hand drawn - the distance between the points which make up the path is likely to be variant.
I would like to find a set of points along this path which are equally separated.
Any ideas how to do this?
I have a user defined path which a user has hand drawn - the distance between the points which make up the path is likely to be variant.
I would like to find a set of points along this path which are equally separated.
Any ideas how to do this?
If you measure distance along the path it is no different from a straight line. If the length is $L$ and you want $n$ points (including the ends) you put a point at one end and every $\frac{L}{n-1}$ along the way. If you measure distance as straight lines between the points there is no guarantee of a solution, but you could just start with this guess (or something a bit smaller) and "swing a compass" from each point, finding where it cuts the curve (could be more than once-this is problematic), and see how close to the end you wind up. Then a one-dimensional rootfinder (the parameter is the length of the radius) will do as well as possible.
You're looking for an arc-length parametrization that you can sample uniformly. See http://groups.google.com/group/comp.graphics.algorithms/msg/c7025fd53b18db94 .
You probably need to smooth the input data before doing this. See for instance Efficient Curve Fitting. See also a summary.