This is com.elbeno.curve, a library for modulating various kinds of curves.
This library depends on com.elbeno.vector and vecto.
The following curves are supported:
- Cubic B?zier curves
- Cubic B?zier splines
- Line segments
- "Polylines" i.e. sequences of line segments
Each curve type may be modulated onto each other curve type (e.g. modulate a "wave" B?zier curve onto a circle to produce a circle with a wavy edge). C1 continuity is preserved.
Arbitrary elliptical arcs are approximated with cubic B?zier curves using the method in Luc Maisonobe's paper "Drawing an elliptical arc using polylines, quadratic or cubic B?zier curves" (which can be found at http:// www.spaceroots.org/documents/ellipse/elliptical-arc.pdf).
Sample usage/output can be seen from the file test.lisp or by invoking (runtests).
- Ben Deane <email@example.com>