RESAMPLEPOLYLINE Distribute N points equally spaced on a polyline.
RES = resamplePolyline(POLY, N)
Resample the input polyline POLY such that the resulting polyline RES
has N points. All points of RES belong to the initial polyline, but are
not necessarily vertices.
Example
poly = [0 10;0 0;20 0];
figure; drawPolyline(poly, 'b');
poly2 = resamplePolyline(poly, 10);
hold on;
drawPolyline(poly2, 'bo');
axis equal; axis([-10 30 -10 20]);
See also
polygons2d, drawPolyline, resamplePolygon, resamplePolylineByLength
Package: matgeom