Spline Toolbox    

Example: Circle

For example,

provides a rational spline whose values on its basic interval trace out the unit circle, i.e., the circle of radius 1 with center at the origin, as the command

readily shows; have a look at the resulting plot, in Figure 2-14.

Figure 2-14: A Circle and an Ellipse, Both Given By a Rational Spline

It is easy to manipulate this circle to obtain related shapes. For example, the next commands stretch the circle into an ellipse, rotate the ellipse 45 degrees, and translate it by (1,1), and then plot it on top of the circle.

As a further example, the "circle" just constructed is put together from four pieces. We highlight the first such piece, by the following commands:

In the first command, fn2fm is used to change forms, from one based on the B-form to one based on the ppform, and then fnbrk is used to extract the first piece, and this piece is then plotted on top of the circle in Figure 2-14, with linewidth 3 to make it stand out.


  Rational Splines Example: Sphere