[Previous] [Up] [Next]
Go backward to Polygonal objects
Go up to Object types
Go forward to Text objects

Spline objects

Ipe provides uniform cubic B-splines to model curved scenes. The definitions of cubic uniform B-splines can be found in the printed manual or in a book on computer graphics. A good presentation is J. D. Foley, A. Van Dam, S. K. Feiner, and J. F. Hughes, Computer Graphics: Principles and Practice, Addison-Wesley, 1990.   In general, the spline does not pass through any of its control points. It can be forced close to a control point by repeating that control point, and it can be forced to meet a control point by repeating that control points twice. Ipe offers a convenient way to repeat control points. If you press one of the keys 1, 2, or 3 while creating or editing a spline or splinegon, the selected vertex (the previous vertex in creation mode) will be given that multiplicity. From the spline's point of view this is equivalent to clicking twice or three times at the same position. However, by doing it Ipe's way you can later move a vertex with all its copies at the same time, and the vertex will be recognized by the snapping mechanism.

In many situations you want to give the first and last control point of a spline multiplicity three, to force the spline to begin and end in these points. This can be enforced automatically by setting the button 3 Spline in the configuration panel to on. Note that control points with multiplicity are represented somewhat differently from normal control points: a control point with multiplicity two becomes a little triangle, a control point with multiplicity three becomes a small disc.

Except for this, entry and editing of splines is very similar to that for polygonal objects. Splines can also have arrows, but only on endpoints with multiplicity 3.

  Ipe computes a polygonal approximation for every spline. This approximation is used for snapping to splines, and for drawing filled splinegons. You can specify the precision of the polygonal approximation by setting SplinePrecision in the configuration file. To get nice filled splinegons on the screen, you will want to set the value smaller than the default 4.0. However, if you set it too small, the approximation might become too long for the GL graphics library to draw, and you will not see anything at all (See also the discussion on stroke and fill colors).

  As a final bonus, it should be mentioned that when you enter a spline with only three control points (all of which have multiplicity one), a quadratic B-spline is computed.


[Previous] [Up] [Next]