pgeneralize (<points>,<num>)
point
A generalized version of a supplied polyline.
Generalization performs vector smoothing according to a supplied generalization factor (distance). Points which are within distance of each other are removed, and those which are within distance from the centre-line are snapped to form a new center-line.
<points>
An array of points
forming a polyline.
<num>
The generalization factor (distance) in modelling units.
The smoothing algorithm used by this function is the Douglas-Peucker Hull algorithm,
see:
"D. H. Douglas and T. K. Peucker. Algorithms for the reduction of the number of points required
to represent a line or its caricature."
The Canadian Cartographer, 10(2):112--122, 1973.
point ppp[] # ... add commands to populate ppp point newppp[] = pgeneralize(ppp,10)