Next: , Previous: Rational Bezier curves, Up: Elementary curves

5.6.2 Segments

Segments in GEOMLIB are stored in the following structure:

     struct geom_segment {
       struct geom_curve curve; /* ancestor instance structure */
       struct geom_point a, b; /* endpoints */

The TIME parametrization is given by formula:


The implementation of segments is very simple and intuitive. Some virtual methods are not redefined for segments, so Bézier expansion to non-rational linear curve is necessary. Details can be found in the files geomlib/segment.h and geomlib/segment.c.