implement bezier curves of arbitrary degree (passing an array of control points). Linear and quadratic curves are treated as special cases (without any overhead). The generic method is bezierN (as of "degree n", I couldn't think of a better name).
implement bezier "splines", that is smooth compositions of (cubic) beziers that pass through a given set of points (much easier to use than control points), using this technique. This is similar to GreenSock's thru beziers (at least the general concept, the exact generated path is likely different, I didn't even look at their "proprietary algorithm").
To make the implementation simple, I made ComponentPath accept arbitrary IComponentPath instances as path segments. In particular, this allows to use ComponentPath itself as a segment of a larger ComponentPath. So BezierSplinePath is naturally implemented as a ComponentPath subclass, which computes the bezier segments (once the start is known) and adds them to itself.
Some bezier-related improvements:
implement bezier curves of arbitrary degree (passing an array of control points). Linear and quadratic curves are treated as special cases (without any overhead). The generic method is
bezierN
(as of "degree n", I couldn't think of a better name).implement bezier "splines", that is smooth compositions of (cubic) beziers that pass through a given set of points (much easier to use than control points), using this technique. This is similar to GreenSock's thru beziers (at least the general concept, the exact generated path is likely different, I didn't even look at their "proprietary algorithm").
To make the implementation simple, I made
ComponentPath
accept arbitraryIComponentPath
instances as path segments. In particular, this allows to useComponentPath
itself as a segment of a largerComponentPath
. SoBezierSplinePath
is naturally implemented as aComponentPath
subclass, which computes the bezier segments (once the start is known) and adds them to itself.