Sample Parameter Files for scurvy
All the files listed below are available in a tar
archive; use tar xf parameters.tar to unpack the
archive.
Trivial cubic curve (trivial.sc)
This is a trivial example of a cubic spline with only one segment. In
this case, the spline's de Boor points are the Bézier points of
the one and only spline segment. Also, animating the movement of a
particle - with the interpolating lines made visible - produces a
visualization of the de Casteljau algorithm.
# The degree of the spline.
3
# The number of the spline's knots.
2
# The values of the spline's knots.
0
1
# The de Boor points of the spline.
0.0 0.0 0.0
3.0 5.0 0.0
9.0 5.0 0.0
12.0 0.0 0.0
Simple cubic curve (simple.sc)
This is a simple example of a cubic spline with three segments. The
segments meet smoothly at the joints. Also, selecting and moving
different de Boor points causes different segments to be highlighted
and reshaped. Finally, animating the movement of a particle - with the
interpolating lines made visible - produces a visualization of the de
Boor algorithm.
# The degree of the spline.
3
# The number of the spline's knots.
4
# The values of the spline's knots.
0
1
2
3
# The multiplicities of the interior knots.
1
1
# The de Boor points of the spline.
0.0 0.0 0.0
3.0 5.0 0.0
9.0 5.0 0.0
12.0 -5.0 0.0
18.0 -5.0 0.0
21.0 0.0 0.0
Simple quartic curve (quartic.sc)
This is a simple example of a quartic (degree 4) spline. It has the
same de Boor points as the previous example, but the shape is
different because of the higher degree. Also, it has only two
segments, which are now influenced by different de Boor
points. Finally, animating the movement of a particle - with the
interpolating lines made visible - produces a visualization of the de
Boor algorithm for quartic curves, which is substantially more complex
than in the cubic case.
# The degree of the spline.
4
# The number of the spline's knots.
3
# The values of the spline's knots.
0
1
2
# The multiplicities of the interior knots.
1
# The de Boor points of the spline.
0.0 0.0 0.0
3.0 5.0 0.0
9.0 5.0 0.0
12.0 -5.0 0.0
18.0 -5.0 0.0
21.0 0.0 0.0
Affine curve with non-simple knots (affine.sc)
This is a simple example of an affine (degree 1) spline, i.e. all the
segments of this spline are lines. The third knot of this spline has a
multiplicity of 2, making it possible for the second and third
segments to be disjoint.
# The degree of the spline.
1
# The number of the spline's knots.
4
# The values of the spline's knots.
0
1
2
3
# The multiplicities of the interior knots.
1
2
# The de Boor points of the spline.
0.0 0.0 0.0
3.0 3.0 0.0
9.0 3.0 0.0
12.0 -3.0 0.0
18.0 0.0 0.0
Cubic curve with non-simple knots (multiple.sc)
This example illustrates the use of a knot sequence containing several
non-simple knots, i.e. knots with multiplicity greater than
1. Consecutive interior knots have multiplicities 1, 2, 3, and 4, and
thus, at successive joints, one additional derivative of the curve may
become discontinuous. Animating the movement of a particle - with the
particle made visible - will illustrate the discontinuities in the
higher derivatives, which are not evident in static images.
# The degree of the spline.
3
# The number of the spline's knots.
6
# The values of the spline's knots.
0
1
2
3
4
5
# The multiplicities of the interior knots.
1
2
3
4
# The de Boor points of the spline.
0.0 0.0 0.0
3.0 3.0 0.0
9.0 3.0 0.0
12.0 -3.0 0.0
18.0 -3.0 0.0
21.0 3.0 0.0
27.0 3.0 0.0
30.0 -3.0 0.0
27.0 -9.0 0.0
18.0 -15.0 0.0
12.0 -18.0 0.0
6.0 -18.0 0.0
0.0 -9.0 0.0
0.0 -3.0 0.0
Knot spacing (uniform.sc and nonuniform.sc)
These examples differ only in the knot spacing; however, the effect of
this difference on the shape of the curve is substantial.
# The degree of the spline.
3
# The number of the spline's knots.
4
# The values of the spline's knots.
Insert
0
33.3333
66.6666
100
for uniform spacing and
0
10
90
100
for non-uniform spacing.
# The multiplicities of the interior knots.
1
1
# The de Boor points of the spline.
0.0 0.0 0.0
5.0 0.0 0.0
1.0 -3.0 0.0
14.0 -3.0 0.0
10.0 0.0 0.0
15.0 0.0 0.0
Long cubics (long.sc and s.sc)
These two examples simply show cubic curves composed of several
segments and thus able to model interesting shapes. The second
example, s.sc, illustrates the parameters used to specify
the spline of scurvy's typical
screen.
# long.sc
#
# The degree of the spline.
3
# The number of the spline's knots.
10
# The values of the spline's knots.
0
1
2
3
4
5
6
7
8
9
# The multiplicities of the interior knots.
1
1
1
1
1
1
1
1
# The de Boor points of the spline.
0.0 0.0 0.0
3.0 3.0 0.0
9.0 3.0 0.0
12.0 -3.0 0.0
18.0 -3.0 0.0
21.0 3.0 0.0
27.0 3.0 0.0
30.0 -3.0 0.0
27.0 -9.0 0.0
18.0 -15.0 0.0
9.0 -15.0 0.0
3.0 -9.0 0.0
# s.sc
#
# The degree of the spline.
3
# The number of the spline's knots.
10
# The values of the spline's knots.
0
1
2
3
4
5
6
7
8
9
# The multiplicities of the interior knots.
1
1
1
1
1
1
1
1
# The de Boor points of the spline.
20.602 4.99651 0.0
18.1735 8.76941 0.0
10.3005 9.91298 0.0
6.93504 3.98142 0.0
6.91186 -2.45244 0.0
12.5128 -6.03478 0.0
19.2657 -5.89789 0.0
22.6079 -10.6659 0.0
22.6195 -16.8712 0.0
18.0684 -20.8179 0.0
10.848 -20.8179 0.0
7.17516 -16.8712 0.0
Last update: 3 November 1995 by Apostolos "Toli" Lerios
[email protected]