Computer Aided Geometric Design
Computer Aided Geometric Design
BYU ScholarsArchive
Faculty Publications
2012-01-10
This Book Chapter is brought to you for free and open access by BYU ScholarsArchive. It has been accepted for
inclusion in Faculty Publications by an authorized administrator of BYU ScholarsArchive. For more information,
please contact [email protected], [email protected].
COMPUTER AIDED GEOMETRIC DESIGN
Thomas W. Sederberg
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
T. W. Sederberg iii
Preface
I taught a course at Brigham Young University titled “Computer Aided Geometric Design” starting
in 1983. Back then, the field was young enough that no textbook covered everything that I wanted
to teach, and so these notes evolved.
The field has matured to the point that several semesters worth of valuable material could be
compiled. These notes, admittedly biased towards my own interests, reflect my personal preferences
as to which of that material is most beneficial to students in an introductory course.
I welcome anyone who has an interest in studying this fascinating topic to make free use of these
notes. Although I retired in 2017, I invite feedback on typos and on material that could be written
more clearly.
Thomas W. Sederberg
[email protected]
July 2017
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
iv T. W. Sederberg
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Contents
1 Introduction 1
1.1 Points, Vectors and Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Vector Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Points vs. Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Rotation About an Arbitrary Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Matrix Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Parametric, Implicit, and Explicit Equations . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.1 Parametric equations of lines . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.2 Implicit equations of lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.3 Distance from a point to a line . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Conic Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.6.1 Parametric equations of conics . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2 Bézier Curves 17
2.1 The Equation of a Bézier Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2 Bézier Curves over Arbitrary Parameter Intervals . . . . . . . . . . . . . . . . . . . . 20
2.3 The de Casteljau Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4 Degree Elevation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5 The Convex Hull Property of Bézier Curves . . . . . . . . . . . . . . . . . . . . . . . 24
2.6 Distance between Two Bézier Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.7 Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.8 Three Dimensional Bézier Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.9 Rational Bézier Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.9.1 De Casteljau Algorithm and Degree Elevation on Rational Bézier Curves . . 28
2.9.2 First Derivative at the Endpoint of a Rational Bézier Curve . . . . . . . . . . 30
2.9.3 Curvature at an Endpoint of a Rational Bézier Curve . . . . . . . . . . . . . 30
2.10 Continuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.11 Curvature Combs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.12 Circular Arcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.13 Reparametrization of Bézier Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.14 Advantages of Rational Bézier Curves . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.15 Explicit Bézier Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.16 Integrating Bernstein polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
v
vi CONTENTS
4 Forward Differencing 45
4.1 Choosing δ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6 B-Spline Curves 57
6.1 Polar Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.1.1 Subdivision of Bézier Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.2 Knot Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.3 Extracting Bézier Curves from B-splines . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.4 Multiple knots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.4.1 Labelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.5 Periodic B-splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.6 Bézier end conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.7 Knot insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.8 The de Boor algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.9 Explicit B-splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.10 B-spline hodographs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.11 Symmetric polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.12 Combining Bézier curves into a B-spline . . . . . . . . . . . . . . . . . . . . . . . . . 66
6.13 Knot Intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.13.1 Knot Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.13.2 Interval Halving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
6.13.3 Degree-Two B-Splines using Knot Intervals . . . . . . . . . . . . . . . . . . . 73
6.13.4 Hodographs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.13.5 Degree elevation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.14 B-spline Basis Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.14.1 B-Spline Basis-Functions using Knot Intervals . . . . . . . . . . . . . . . . . . 78
6.14.2 Refinement of B-Spline Basis Functions . . . . . . . . . . . . . . . . . . . . . 79
6.14.3 Recurrence Relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.14.4 Approximating a Circle using a Periodic Uniform B-Spline Curve . . . . . . . 81
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
CONTENTS vii
8 Offset Curves 99
11 Approximation 121
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
11.2 L2 Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
11.3 Approximating a Set of Discrete Points with a B-Spline Curve . . . . . . . . . . . . 122
11.3.1 Parametrization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
11.3.2 Knot vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
11.4 Fairing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
11.4.1 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
11.4.2 Constrained fairing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
11.4.3 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
viii CONTENTS
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
CONTENTS ix
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
x CONTENTS
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
List of Figures
xi
xii LIST OF FIGURES
5.2 Timmer’s PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.3 Ball’s Cubic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4 Overhauser curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
LIST OF FIGURES xiii
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
xiv LIST OF FIGURES
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
LIST OF FIGURES xv
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 1
Introduction
Computer aided geometric design (CAGD) concerns itself with the mathematical description of
shape for use in computer graphics, manufacturing, or analysis. It draws upon the fields of geometry,
computer graphics, numerical analysis, approximation theory, data structures and computer algebra.
CAGD is a young field. The first work in this field began in the mid 1960s. The term computer
aided geometric design was coined in 1974 by R.E. Barnhill and R.F. Riesenfeld in connection with
a conference at the University of Utah.
This chapter presents some basic background material such as vector algebra, equations for lines
and conic sections, homogeneous coordinates.
1
2 Points, Vectors and Coordinate Systems
V
V
describe a three-dimensional vector in the form (a, b, c) where a (or b or c) is the distance in the x
(or y or z) direction from the tail to the tip of the vector.
j y
ck
i bj
k V = a i+ b j + c k
ai
X x
z
Z
Unit Vectors The symbols i, j, and k denote vectors of “unit length” (based on the unit of
measurement of the coordinate system) which point in the positive x, y, and z directions respectively
(see Figure 1.2.a).
Unit vectors allow us to express a vector in component form (see Figure 1.2.b):
P = (a, b, c) = ai + bj + ck.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Vector Algebra 3
P2/1 = P2 − P1
as the vector pointing from P1 to P2 . This notation P2/1 is widely used in engineering mechanics,
and can be read “the position of point P2 relative to P1 ”
In our diagrams, points will be drawn simply as dots or small circles, and vectors as line segments
with single arrows. Vectors and points will both be denoted by bold faced type.
A
A
B -B
A+B
B B+A=A+B
A-B
Subtraction:
P1 − P2 = (x1 − x2 , y1 − y2 , z1 − z2 )
Scalar multiplication:
cP1 = (cx1 , cy1 , cz1 )
Length of a Vector q
|P1 | = x21 + y12 + z12
A vector of length one is called a unit vector.
P1
|P1 |
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
4 Vector Algebra
An important application of dot products is in computing the projection of one vector onto
another vector. As illustrated in Figure 1.4, vector R is the projection of vector P onto vector Q.
Since
P·Q
|R| = |P| cos θ =
|Q|
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Vector Algebra 5
we have
Q P·Q Q P·Q
R = |R| = = Q.
|Q| |Q| |Q| Q·Q
Example. Find the projection of P = (3, 2, 1) onto Q = (3, 6, 6).
Answer.
P·Q
R = Q
Q·Q
(3, 2, 1) · (3, 6, 6)
= (3, 6, 6)
(3, 6, 6) · (3, 6, 6)
27
= (3, 6, 6)
81
= (1, 2, 2)
(where again θ is the angle between P1 and P2 ), and whose direction is mutually perpendicular to
P1 and P2 with a sense defined by the right hand rule as follows. Point your fingers in the direction
of P1 and orient your hand such that when you close your fist your fingers pass through the direction
of P2 . Then your right thumb points in the sense of P1 × P2 .
From this basic definition, one can verify that
P1 × P2 = −P2 × P1 ,
i × j = k, j × k = i, k×i=j
j × i = −k, k × j = −i, i × k = −j.
The cross product obeys the distributive law
P1 × (P2 + P3 ) = P1 × P2 + P1 × P3 .
P1 × P2 = (x1 i + y1 j + z1 k) × (x2 i + y2 j + z2 k)
= (y1 z2 − y2 z1 , x2 z1 − x1 z2 , x1 y2 − x2 y1 )
i j k
= x1 y1 z1 (1.3)
x2 y2 z2
Area of a Triangle. Cross products have many important uses, such as finding a vector which is
mutually perpendicular to two other vectors and finding the area of a triangle which is defined by
three points P1 , P2 , P3 .
1 1
Area = |P1/2 ||P1/3 | sin θ1 = |P1/2 × P1/3 | (1.4)
2 2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
6 Rotation About an Arbitrary Axis
For example, the area of a triangle with vertices P1 = (1, 1, 1), P2 = (2, 4, 5), P3 = (3, 2, 6) is
1
Area = |P1/2 × P1/3 |
2
1
= |(1, 3, 4) × (2, 1, 5)|
2
1 1p 2
= |(11, 3, −5)| = 11 + 32 + (−5)2
2 2
≈ 6.225
P’
! P
y n
z x
B
The problem of computing a rotation about an arbitrary axis is fundamental to CAGD and
computer graphics. The standard solution to this problem as presented in most textbooks on com-
puter graphics involves the concatenation of seven 4 × 4 matrices. We present here a straightforward
solution comprised of the four simple vector computations in equations (1.6) through (1.9) — a
compelling example of the power of vector algebra.
Figure 1.5 shows a point P which we want to rotate an angle θ about an axis that passes through
B with a direction defined by unit vector n. So, given the angle θ, the unit vector n, and Cartesian
coordinates for the points P and B, we want to find Cartesian coordinates for the point P0 .
The key insight needed is shown in Figure 1.6.a.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Rotation About an Arbitrary Axis 7
v
v P’
r
r v sin! !
C P
u
! u
C u cos!
y n
z x
Let u and v be any two three-dimensional vectors that satisfy u · v = 0 (that is, they are
perpendicular) and |u| = |v| 6= 0 (that is, they are they same length but not necessarily unit
vectors). We want to find a vector r that is obtained by rotating u an angle θ in the plane defined
by u and v. As suggested in Figure 1.6,
With that insight, it is easy to compute a rotation about an arbitrary axis. Note that (C − B)
is the projection of vector (P − B) onto the unit vector n. Referring to the labels in Figure 1.6.b,
we compute
C = B + [(P − B) · n]n. (1.6)
u=P−C (1.7)
v =n×u (1.8)
Then, r is computed using equation (1.5), and
P0 = C + r. (1.9)
Example
Find the coordinates of a point (5, 7, 3) after it is rotated an angle θ = 90◦ about an axis that points
in the direction (2, 1, 2) and that passes through the point (1, 1, 1).
Answer:
n = ( 32 , 31 , 23 ).
C = B + [(P − B) · n]n
2 1 2 2 1 2
= (1, 1, 1) + [((5, 7, 3) − (1, 1, 1)) · ( , , )]( , , )
3 3 3 3 3 3
= (5, 3, 5)
(1.10)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
8 Rotation About an Arbitrary Axis
u = P − C = (0, 4, −2)
10 4 8
v = n × u = (− , , ).
3 3 3
r = u cos θ + v sin θ = u · 0 + v · 1 = v.
vx = ny uz − nz uy (1.19)
vy = nz ux − nx uz (1.20)
vz = nx uy − ny ux (1.21)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Parametric, Implicit, and Explicit Equations 9
Since n2x + n2y + n2z = 1, (1 − n2x ) = n2y + n2z . In like manner we can come up with an expression for
y 0 and z 0 , and our matrix M is thus
2
nx + (n2y + n2z ) cos θ
nx ny (1 − cos θ) − nz sin θ nx nz (1 − cos θ) + ny sin θ T1
nx ny (1 − cos θ) + nz sin θ n2y + (n2x + n2z ) cos θ ny nz (1 − cos θ) − nx sin θ T2
(1.27)
nx nz (1 − cos θ) − ny sin θ ny nz (1 − cos θ) + nx sin θ n2z + (n2x + n2y ) cos θ T3
0 0 0 1
with
T1 = (Bx − (B · n)nx )(1 − cos θ) + (nz By − ny Bz ) sin θ
T2 = (By − (B · n)ny )(1 − cos θ) + (nx Bz − nz Bx ) sin θ
T3 = (Bz − (B · n)nz )(1 − cos θ) + (ny Bx − nx By ) sin θ
x(t) y(t)
x = y = . (1.28)
w(t) w(t)
f (x, y) = 0. (1.29)
An explicit equation of a curve is a special case of both the parametric and implicit forms:
y = f (x). (1.30)
In these notes, we restrict ourselves to the case where the functions x(t), y(t), w(t), f (x) and f (x, y)
are polynomials.
Any curve that can be expressed parametrically as in equation (1.28) is referred to as a rational
curve. In the classical algebraic geometry literature, a rational curve is sometimes called a unicursal
curve, which means that it can be sketched in its entirety without removing one’s pencil from the
paper. In computer aided geometric design, rational curves are often called rational parametric
curves. The case where w(t) ≡ 1 is called a polynomial parametric curve (or a non-rational
parametric curve). A curve that can be expressed in the form of equation (1.29) is known as a
planar algebraic curve.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
10 Lines
The parametric equation of a curve has the advantage of being able to quickly compute the (x, y)
coordinates of points on the curve for plotting purposes. Also, it is simple to define a curve segment
by restricting the parameter t to a finite range, for example 0 ≤ t ≤ 1. On the other hand, the
implicit equation of a curve enables one to easily determine whether a given point lies on the curve,
or if not, which side of the curve it lies on. Chapter 17 shows that it is always possible to compute
an implicit equation for a parametric curve. It is trivial to convert en explicit equation of a curve
into a parametric equation (x = t, y = y(x)) or into an implicit equation (f (x) − y = 0). However,
a curve defined by an implicit or parametric equation cannot in general be converted into explicit
form.
A rational surface is one that can be expressed
where x(s, t), y(s, t), z(s, t) and w(s, t) are polynomials. Also, a surface that can be expressed by
the equation
f (x, y, z) = 0 (1.32)
1.5 Lines
The simplest case of a curve is a line. Even so, there are several different equations that can be used
to represent lines.
x = a0 + a1 t; y = b0 + b1 t
In vector form,
x(t) a0 + a1 t
P(t) = = = A0 + A1 t. (1.34)
y(t) b0 + b1 t
In this equation, A0 is a point on the line and A1 is the direction of the line (see Figure 1.7)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Lines 11
A1
A0
P1
2/3
P1
t = t1
t=4
1/3
P0
P0 t=2
t = t0
t=1
Equation 1.36 is called an affine equation, whereas equation 1.34 is called a linear equation.
An affine equation is coordinate system independent, and is mainly concerned with ratios and
proportions. An affine equation can be thought of as answering the question: “If a line is defined
through two points P0 and P1 , and if point P0 corresponds to parameter value t0 and point P1
corresponds to parameter value t1 , what point corresponds to an arbitrary parameter value t?”
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
12 Lines
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Lines 13
n
P
P - P0 line
P0 (P - P0) • n = 0
a b c
f (x, y) = a0 x + b0 y + c0 = √ x+ √ y+ √ = 0.
a2 + b2 a2 + b2 a2 + b2
Then, f (x, y) is the signed distance from the point (x, y) to the line, with all points on one side
of the line having f (x, y) > 0 and the other side having f (x, y) < 0. Note that |c0 | = |f (0, 0)| is
the distance from the origin to the line. Thus, if c = 0, the line passes through the origin. The
coefficients a0 and b0 relate to the slope of the line. Referring to Figure 1.10, a0 = cos(θ), b0 = sin(θ),
and c0 = −p.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
14 Conic Sections
p
θ
x
ax2 + bxy + cy 2 + dx + ey + f = 0
Conics can be classified as hyperbolas, parabolas and ellipses (of which the circle is a special case).
What distinguishes these cases is the number of real points at which the curve intersects the line
at infinity W = 0. A hyperbola intersects W = 0 in two real points. Those points are located an
infinite distance along the asymptotic directions. A parabola is tangent to the line at infinity, and
thus has two coincident real intersection points. This point is located an infinite distance along the
parabola’s axis of symmetry. Ellipses do not intersect the line at infinity at any real point — all real
points on an ellipse are finite.
To determine the number of real points at which a conic intersects the line at infinity, simply
intersect equation 1.39 with the line W = 0 by setting W = 0 to get:
aX 2 + bXY + cY 2 = 0
from which √
Y −b ± b2 − 4ac
= .
X 2c
The two values Y /X are the slopes of the lines pointing to the intersections of the conic with the
line at infinity. Thus, if b2 − 4ac > 0, there are two distinct real intersections and the conic is a
hyperbola. If b2 − 4ac = 0, there are two coincident real intersections and the conic is a parabola,
and if b2 − 4ac < 0, there are no real intersections and the conic is an ellipse. The value b2 − 4ac is
known as the discriminant of the conic.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Conic Sections 15
d2 t2 + d1 t + d0 = 0.
Thus, we note that d21 − 4d0 d2 serves the same function as the discriminant of the implicit equation.
If d21 − 4d0 d2 > 0, there are two real, distinct values of t at which the conic goes to infinity and
the curve is a hyperbola. If d21 − 4d0 d2 < 0, there are no real values of t at which the conic goes
to infinity and the curve is an ellipse. If d21 − 4d0 d2 = 0, there are two real, identical values of t at
which the conic goes to infinity and the curve is a parabola.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
16 Conic Sections
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 2
Bézier Curves
Bézier curves are named after their inventor, Dr. Pierre Bézier, an engineer with the Renault car
company who set out in the early 1960’s to develop a curve formulation for use in shape design
that would be intuitive enough for designers and artists to use, without requiring a background in
mathematics.
Figure 2.1 shows three different Bézier curves, with their corresponding control polygons. Each
control polygon is comprised of four control points that are connect with line segments. (These
control polygons are not closed, and might more properly be called polylines.) The beauty of the
Bézier representation is that a Bézier curve mimics the shape of its control polygon. A Bézier
curve passes through its first and last control points, and is tangent to the control polygon at those
endpoints. An artist can quickly master the process of designing shapes using Bézier curves by
moving the control points, and most 2D drawing systems like Adobe Illustrator use Bézier curves.
Complicated shapes can be created by using a sequence of Bézier curves. Since Bézier curves are
tangent to their control polygons, it is easy to join together two Bézier curves such that they are
tangent continuous. Figure 2.2 shows the outline of a letter “g” created using several Bézier curves.
All PostScript font outlines are defined using Bézier curves. Hence, as you read these notes, you are
gazing upon Bézier curves!
Although Bézier curves can be used productively by artists who have little mathematical training,
17
18 The Equation of a Bézier Curve
one of the main objectives in this course is to study the underlying mathematics. These notes attempt
to show that the power and elegance of Bézier curves are matched by the beauty of the underlying
mathematics.
P1 P2 P1 P2
P0 P3 P0 P3
(a) Center of mass of four points. (b) Cubic Bézier Curve.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
The Equation of a Bézier Curve 19
Figure 2.3.b shows the Bézier curve that results when the point masses in Figure 2.3.a are taken as
control points. This curve is a cubic Bézier curve — cubic because the mass equations are degree
three polynomials in t.
Notice that the mass equations in (2.1) sum identically to one:
and so we can write the equation of this Bézier curve as P(t) = m0 (t)P0 + m1 (t)P1 + m2 (t)P2 + m3 (t)P3 .
The mass functions are plotted in the graph in Figure 2.4. Note that when t = 0, m0 = 1 and
m
1
m0 m3
m1 m2
t
0
0 1
Degree 1 Degree 2
Degree 3 Degree 4
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
20 Bézier Curves over Arbitrary Parameter Intervals
where
n
Bin (t) = (1 − t)n−i ti , i = 0, 1, ..., n.
i
Recall that
n n!
= .
i i!(n − i)!
n
i is spoken “n – choose – i” and is called a binomial coefficient because it arises in the binomial
expansion
n
n
X n i n−i
(a + b) = ab .
i=0
i
In the degree three case, n = 3 and B03 = (1 − t)3 , B13 = 3t(1 − t)2 , B23 = 3t2 (1 − t) and B33 = t3 .
Bin (t)is also referred to as the ith Bernstein polynomial of degree n. The equation of a Bézier curve
is thus:
n
X n
P(t) = (1 − t)n−i ti Pi . (2.2)
i=0
i
Pji = (1 − τ )Pj−1
i + τ Pj−1
i+1 ; j = 1, . . . , n; i = 0, . . . , n − j. (2.4)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
The de Casteljau Algorithm 21
−t0
where τ = tt21 −t 0
. Then, the control points for P[t0 ,t1 ] (t) are P00 , P10 , P20 , . . . , Pn0 and the control
points for P[t1 ,t2 ] (t) are Pn0 , Pn−1
1 , Pn−2
2 , . . . , P0n . Although our example is for a cubic Bézier curve
(n = 3), the algorithm works for any degree.
A practical application of the de Casteljau algorithm is that it provides a numerically stable means
of computing the coordinates and tangent vector of any point along the curve, since P(t1 ) = Pn0
and the tangent vector is Pn−1 1 − Pn−1
0 .
Figure 2.7 shows that when a Bézier curve is repeatedly subdivided, the collection of control
polygons converge to the curve. Thus, one way of plotting a Bézier curve is to simply subdivide it
1 curve 2 curves
4 curves 8 curves
an appropriate number of times and plot the control polygons (although a more efficient way is to
use Horner’s algorithm (see Chapter 3) or forward differencing (see Chapter 4)).
The de Casteljau algorithm works even if τ 6∈ [0, 1], which is equivalent to t1 6∈ [t0 , t2 ]. Fig. 2.8
shows a quadratic Bézier curve “subdivided” at τ = 2. The de Castelau algorithm is numerically
stable as long as the parameter subdivision parameter is within the parameter domain of the curve.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
22 Degree Elevation
P01
P11
P10
P20
P02
P00
!=2
n
(1 − t)Bin (t) = (1 − t) (1 − t)n−i ti
i
n
= (1 − t)n−i+1 ti
i
n
n+1
= i
n+1
(1 − t)n−i+1 ti
i
i
n
n!
i!(n−i)!
= i
n+1
n+1 Bi = (n+1)!
Bin+1
i i!(n+1−i)!
n!i!(n + 1 − i)! n+1 n!i!(n + 1 − i)(n − i)! n+1
= B = Bi
i!(n − i)!(n + 1)! i i!(n − i)!(n + 1)n!
n + 1 − i n+1
= Bi (2.5)
n+1
and
i + 1 n+1
tBin (t) = B (t). (2.6)
n + 1 i+1
Degree elevation is accomplished by simply multiplying the equation of the degree n Bézier curve
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Degree Elevation 23
by [(1 − t) + t] = 1:
where
i
P∗i = αi Pi−1 + (1 − αi )Pi , αi = . (2.8)
n+1
P1 old P2* P2
Degree 2 Degree 3 Degree 4
P1* new P3*
1/2
1/4
P3 P4*
P0* P0 Degree 5 Degree 6 Degree 7
(a) Degree Elevation of a Cubic Bézier Curve. (b) Repeated degree elevation.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
24 The Convex Hull Property of Bézier Curves
P∗0 = P0
1 3
P∗1 = P0 + P1
4 4
2 2
P∗2 = P1 + P2
4 4
3 1
P∗3 = P2 + P3
4 4
P∗4 = P3
Figure 2.9.a illustrates.
If degree elevation is applied repeatedly, as shown in Figure 2.9.b, the control polygon converges
to the curve itself.
P1 P3 P2 P1
P0 P2 P0 P3
P1 P2 P3
P0 P3
P0 P1 P2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Distance between Two Bézier Curves 25
the vector P(t) − Q(t) between points of equal parameter value on the two curves can itself be
expressed as a Bézier curve
n
X
D(t) = P(t) − Q(t) = (Pi − Qi )Bin (t)
i=0
whose control points are Di = Pi − Qi . The vector from the origin to the point D(t) is P(t) − Q(t).
The convex hull property guarantees that the distance between the two curves is bounded by the
largest distance from the origin to any of the control points Di .
Q1
Q2
P1 P2
P3-Q3
t=1/2
P0-Q0 P2-Q2
P3 P1-Q1
Q0
P0 Q3
This error bound is attractive because it is very easy to compute. However, it is not always a
very tight bound because it is dependent on parametrization.
A more precise statement of the distance between two curves is the Hausdorff distance. Given
two curves P[s0 ,s1 ] (s) and Q[t0 ,t1 ] (t). The Hausdorff distance d(P, Q) is defined
d(P, Q) = max min |P(s) − Q(t)| (2.9)
s∈[s0 ,s1 ] t∈[t0 ,t1 ]
where |P(s) − Q(t)| is the Euclidean distance between a point P(s) and the point Q(t). In practice,
it is much more expensive to compute the Hausdorff distance than to compute a bound using the
difference curve in Figure 2.11.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
26 Derivatives
2.7 Derivatives
The parametric derivatives of a Bézier curve can be determined geometrically from its control points.
For a polynomial Bézier curve P[t0 ,t1 ] (t) of degree n with control points Pi , the first parametric
derivative can be expressed as a polynomial Bézier curve of degree n − 1 with control points Di
where
n
Di = (Pi+1 − Pi ).
t1 − t0
For example, the cubic Bézier curve in Fig. 2.12 has a first derivative curve as shown. The first
D0
3(P1-P0)
P1 (0,0) P’(t)
P0 P(t) 3(P3-P2)
P2
P3 3(P2-P1)
D2
D1
derivative vector P0 (τ ) (that is, the first derivative P(t) evaluated at t = τ ) is tangent to the curve
curve P(t) at the point P(τ ). This is illustrated in Fig. 2.12 for the point τ = .3. In this example,
t0 = 0 and t1 = 1.
The first derivative curve is known as a hodograph. We can compute the second derivative of
a Bézier curve by taking the hodograph of the hodograph (or, the second hodograph), etc. It is
convenient to compute hodographs in tabular form. For example, consider a cubic Bézier curve
P[0, 21 ] (t) with control points
The control points of the first, second, and third hodographs are the rows of the following table:
Curve Control Points
P(t) (2, 1) (4, 5) (8, 6) (9, 2)
P0 (t) (12, 24) (24, 6) (6, −24)
P00 (t) (48, −72) (−72, −120)
P000 (t) (−240, −96)
From this table, we can obtain the values of all derivatives at t = t0 and t = t1 . For exam-
ple, p0 (1/2) = (6, −24), P00 (0) = (48, −72), the the third derivative vector is a constant P000 (t) ≡
(−240, −96).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Three Dimensional Bézier Curves 27
It is noteworthy that if the hodograph passes through the origin, there is a cusp corresponding
to that point on the original curve!
Note that the hodograph we have just described relates only to polynomial Bézier curves, not
to rational Bézier curves or any other curve that we will study. The derivative of any other curve
must be computed by differentiation. For a rational Bézier curve, that differentiation will involve
the quotient rule. Consequently, the derivative of a degree n rational Bézier curve can be expressed
as a rational Bézier curve of degree 2n. As it turns out, the equations for those control points are
rather messy.
The effect of changing a control point weight is illustrated in Fig. 2.13. This type of curve is known
as a rational Bézier curve, because the blending functions are rational polynomials, or the ratio of
two polynomials. Note that if all weights are 1 (or if all weights are simply the same), a rational
Bézier curve reduces to a polynomial Bézier curve.
Rational Bézier curves have several advantages over polynomial Bézier curves. Clearly, rational
Bézier curves provide more control over the shape of a curve than does a polynomial Bézier curve.
In addition, a perspective drawing of a 3D Bézier curve (polynomial or rational) is a rational Bézier
curve, not a polynomial Bézier curve. Also, rational Bézier curves are needed to exactly express
all conic sections. A degree two polynomial Bézier curve can only represent a parabola. Exact
representation of circles requires rational degree two Bézier curves.
A rational Bézier curve can be interpreted as the perspective projection of a 3-D polynomial
curve. Fig. 2.14 shows two curves: a 3-D curve and a 2-D curve. The 2-D curve lies on the plane
z = 1 and it is defined as the projection of the 3-D curve onto the plane z = 1. One way to consider
this is to imagine a funny looking cone whose vertex is at the origin and which contains the 3-D
curve. In other words, this cone is the collection of all lines which contain the origin and a point on
the curve. Then, the 2-D rational Bézier curve is the intersection of the cone with the plane z = 1.
What we see here can be viewed as the geometric interpretation of homogeneous coordinates dis-
cussed in Section 7.1.1. The 3D Bézier control points wi (xi , yi , 1) = (xi wi , yi wi , wi ) can be thought
of as homogeneous coordinates (X, Y, Z) that correspond to 2D Cartesian coordinates ( X Y
Z , Z ). If the
2-D rational Bézier curve has control points (xi , yi ) with corresponding weights wi , then the homo-
geneous (X, Y, Z) coordinates of the 3-D control points are wi (xi , yi , 1) = (xi wi , yi wi , wi ). Denote
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
28 Rational Bézier Curves
P2
w2=5 w2=10
P1
w2=2
w2=1
w2=.5
w2=0
P3
P0
points on the 3-D curve using upper case variables (X(t), Y (t), Z(t)) and on the 2-D curve using
lower case variables (x(t), y(t)). Then, any point on the 2-D rational Bézier curve can be computed
by computing the corresponding point on the 3-D curve, (X(t), Y (t), Z(t)), and projecting it to the
plane z = 1 by setting
X(t) Y (t)
x(t) = , y(t) = .
Z(t) Z(t)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Rational Bézier Curves 29
(x1,y1,1)w1
(x2,y2,1)w2
(x0,y0,1)w0
z
(x3,y3,1)w3
(x1,y1,1)
(x2,y2,1)
z=1 (x0,y0,1) (x3,y3,1)
y
x
z
xi
wi
z=1
1
x
xiwi
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
30 Rational Bézier Curves
yn (t)
y(t) = =
d(t)
w0 y0 n0 (1 − t)n + w1 y1 n1 (1 − t)n−1 t + w2 y2 n2 (1 − t)n−2 t2 + . . .
the equation for the first derivative vector at t = 0 must be found by evaluating the following
equations:
˙
d(0)ẋn (0) − d(0)x n (0)
˙
d(0)ẏn (0) − d(0)y n (0)
ẋ(0) = ; ẏ(0) =
d2 (0) d2 (0)
from which
w1
P0 (0) = n(P1 − P0 ). (2.10)
w0
For a rational curve P[t0 ,t1 ] (t), the first derivative at t = t0 is:
w1 n
P0 (t0 ) = (P1 − P0 ). (2.11)
w0 t1 − t0
The second derivative of a rational Bézier curve at its endpoint is
n(n − 1) w2 2n w1 nw1 − w0
P00 (t0 ) = (P2 − P0 ) − (P1 − P0 ) (2.12)
(t1 − t0 )2 w0 (t1 − t0 )2 w0 w0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Rational Bézier Curves 31
Tangent line
ρ
C
P2
P0
h
a P1
While is is mathematically possible to write down an equation for the first derivative vector and
for the curvature of a rational Bézier curve as a function of t, such equations would be extremely
complicated. The best way to find the curvature or first derivative vector at an arbitrary point
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
32 Continuity
along a rational Bézier curve is to first perform the de Casteljau algorithm (Section 2.3) to make
the desired point an endpoint of the curve, and then apply (2.11) or (2.13).
Example A rational quadratic Bézier curve has control points and weights:
w0 w2 n − 1 h 1·41 4 2
κ(0) = = 2 =
w12 n a2 2 2 52 25
2.10 Continuity
Two curve segments P[t0 ,t1 ] and Q[t1 ,t2 ] are said to be C k continuous (or, to have k th order parametric
continuity) if
P(t1 ) = Q(t1 ), P0 (t1 ) = Q0 (t1 ), . . . , P(k) (t1 ) = Q(k) (t1 ). (2.14)
Thus, C 0 means simply that the two adjacent curves share a common endpoint. C 1 means that the
two curves not only share the same endpoint, but also that they have the same tangent vector at
their shared endpoint, in magnitude as well as in direction. C 2 means that two curves are C 1 and
in addition that they have the same second order parametric derivatives at their shared endpoint,
both in magnitude and in direction.
In Fig. 2.17, the two curves P[t0 ,t1 ] (t) and Q[t1 ,t2 ] (t) are at least C 0 because p3 ≡ q0 . Further-
q3
p0
q2
p1
p2 p3 q0 q1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curvature Combs 33
6 6
(p3 − 2p2 + p1 ) = (q2 − 2q1 + q0 ).
(t1 − t0 )2 (t2 − t1 )2
A second method for describing the continuity of two curves, that is independent of their
parametrization, is called geometric continuity and is denoted Gk . The conditions for geometric
continuity (also known as visual continuity) are less strict than for parametric continuity. For G0
continuity, we simply require that the two curves have a common endpoint, but we do not require
that they have the same parameter value at that common point. For G1 , we require that line seg-
ments p2 − p3 and q0 − q1 are collinear, but they need not be of equal length. This means that
they have a common tangent line, though the magnitude of the tangent vector may be different. G2
(second order geometric continuity) means that the two neighboring curves have the same tangent
line and also the same center of curvature at their common boundary. A general definition of Gn is
that two curves that are Gn can be reparametrized (see Section 2.13) to make them be C n . Two
curves which are C n are also Gn , as long as (2.15) holds.
Second order continuity (C 2 or G2 ) is often desirable for both physical and aesthetic reasons.
One reason that cubic NURBS curves and surfaces are an industry standard in CAD is that they
are C 2 . Two surfaces that are G1 but not G2 do not have smooth reflection lines. Thus, a car body
made up of G1 surfaces will not look smooth in a show room. Railroad cars will jerk where G1
curves meet.
To implement the drawing of a curvature comb that has n teeth, first compute the curvature
κi , i = 1, . . . , n for the n points on the curve corresponding to the teeth. Set κmax to the largest of
the κi . The length of the longest tooth is usually a user-specified value, call it d. Then, the length
κi
of tooth i is simply d κmax .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
34 Circular Arcs
As a general rule, artists consider that the most aesthetically pleasing curves have curvature
combs whose length changes monotonically and smoothly. The line segments are drawn in the
direction away from the center of curvature, as illustrated in Figure 2.18.
The continuity of two curves P and Q can be visualized in terms of their respective curvature
combs. Define a comb curve to be the set of endpoints of a comb. Denote by Pc the curve comb
of P and by Qc the curve comb of Q. Then, if P and Q are G1 , Pc and Qc are discontinuous, as
shown in Figure 2.19.a. If P and Q are G2 , Pc and Qc are G0 , as shown in Figure 2.19.b.
(a) Original curves are G1 . Comb curves are discon- (b) Original curves are G2 . Comb curves are G0 .
tinuous.
To get comb curves that are mathematically G1 , P and Q must be G3 . In practice, some
commercial software advertises that their curves and surfaces are G3 or C 3 . This is often marketing
jargon; what they really mean is that the curvature combs look like they are G1 when in reality, P
and Q may not even be exactly G1 or even G0 .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Circular Arcs 35
Q0; w0= 1
P0; w0= 1
e
P1; w1= cos(θ/2) Q1; w1= (1 + 2cos(θ/2))/3
r r
θ θ Q2; w2= (1 + 2cos(θ/2))/3
d
e
P2; w2= 1 Q3; w3= 1
p3 = (-2,4) p2 = (2,4)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
36 Reparametrization of Bézier Curves
yields
Q(s) = ((2s + 1)2 + (2s + 1) − 1, 2(2s + 1)2 − (2s + 1) + 3) = (4s2 + 6s + 1, 8s2 + 6s + 4).
The curves P(t) and Q(s) consist of the same points (if the domains are infinite) but the correspon-
dence between parameter values and points on the curve are different.
A simple (and obvious) way to reparametrize a Bézier curve P[t0 ,t1 ] (t) is to simply change the
values of t0 and t1 without changing the control points. Thus, two curves P[t0 ,t1 ] (t) and Q[s0 ,s1 ] (s)
that have the same degree, control point positions, and weights, but for which t0 6= s0 and/or t1 6= s1
are reparametrizations of each other. The reparametrization function is
t0 s1 − s0 t1 t1 − t0 s0 t1 − t0 s1 s1 − s0
t= + s, or s = + t.
s1 − s0 s1 − s0 t1 − t0 t1 − t0
Example
Bézier curves P[0,1] (t) and Q[5,9] (s) have the same degree, control point positions, and weights. The
curves look the same, but have different parametrizations. For example,
In general,
5 1
P(t) ≡ Q(5 + 4t) and Q(s) ≡ P(− + s).
4 4
A rational parametric curve can be reparametrized with the substitution t = f (u)/g(u). In
this case, it is possible to perform a rational-linear reparametrization which does not change the
endpoints of the curve segment. If we let
a(1 − u) + bu
t =
c(1 − u) + du
and want u = 0 when t = 0 and u = 1 when t = 1, then a = 0 and b = d. Since we can scale then
numerator and denominator without affecting the reparametrization, set c = 1 and we are left with
bu
t =
(1 − u) + bu
A rational Bézier curve
n n
w1 P1 (1 − t)n−1 t + ... + nn wn Pn tn
0 w0 P0 (1 − t)n + 1
X(t) = n
n + n
n−1 t + ... + n w tn
0 w0 (1 − t) 1 w1 (1 − t) n n
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Advantages of Rational Bézier Curves 37
In other words, if we scale the weights wi by bi , the curve will not be changed!
Negative Weights
Normally, negative weights are discouraged for Bézier curves because they can cause a violation
of the convex hull property. However, an interesting situation arises if we choose b = −1 for the
rational reparametrization: the signs of the weights alternate, and the curve for u ∈ [0, 1] is the
curve t ∈ (∞, 0] ∪ [1, ∞). If the original curve is a quarter circle, the reparametrized curve will be
the rest of the circle, as shown in Figure 2.22.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
38 Explicit Bézier Curves
x = t
y = f (t)
or simply
y = f (x).
An explicit Bézier curve is sometimes called a non-parametric Bézier curve. It is just a polynomial
function expressed in the Bernstein polynomial basis. Figure 2.23 shows a degree five explicit Bézier
curve over the domain [t0 , t1 ] = [0, 1].
P1
P4
P5
.2
0 .4 .6 .8 1
P2
P0
P3
It is also possible to create an explicit rational Bézier curve. However, the representation of a
degree-n rational function Pn
wi yi Bin (t)
x = t; y = Pi=0 n n
i=0 wi Bi (t)
as an explicit Bézier curve is degree n + 1 because we must have
Pn
wi Bin (t)
x = t = t Pni=0 n
i=0 wi Bi (t)
which is degree n + 1. Since x(t) is degree n + 1, we must likewise degree elevate y(t).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Integrating Bernstein polynomials 39
is that polynomial whose derivative is p(t). If the desired integral is a degree n + 1 polynomial in
Bernstein form
n+1
X
q(t) = qi Bin+1 (t), (2.17)
i=0
we have
pi = (n + 1)(qi+1 − qi ). (2.18)
Hence, q0 = 0 and
Pi−1
j=0 pj
qi = , i = 1, n + 1. (2.19)
n+1
Note that if p(t) is expressed as an explicit Bézier curve, q(t) can be interpreted as the area under
p(t) between the lines x = 0 and x = t. Thus, the entire area under an explicit Bézier curve can be
computed as simply the average of the control points! This is so because
Pn
j=0 pj
q(1) = qn+1 = . (2.20)
n+1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
40 Integrating Bernstein polynomials
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 3
using n multiplies and adds. The trick is to rewrite the polynomial in nested form:
y(t) = (· · · ((pn t + pn−1 )t + pn−2 )t + · · · + p1 )t + p0
This can be written
hn = pn
hi−1 = t · hi + pi−1 , i = n, . . . , 1
y(t) = h0
or, as a C funtion,
float p_horner(float *p,int n, float t)
{
float h;
int i;
h = p[n];
for(i=n-1; i>=0; i--)
h = t*h + p[i];
return h;
}
This is the fastest algorithm for evaluating a power basis polynomial at a single point.
For evaluating a polynomial at several evenly spaced intervals (f (0), f (a), f (2a), f (3a), etc.)
forward differencing works faster (see Chapter 4) but suffers from numerical instability.
41
42 Horner’s Algorithm in Bernstein Basis
u = 1.0 - t;
bc = 1;
tn = 1;
tmp = b[0]*u;
for(i=1; i<n; i++){
tn = tn*t;
bc = bc*(n-i+1)/i;
tmp = (tmp + tn*bc*b[i])*u;
}
return (tmp + tn*t*b[n]);
}
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Basis Conversion 43
A power basis polynomial is equivalent to a Bernstein basis polynomial (P (t) ≡ B(t)) if and only if
P (i) (0)ti B (i) (0)ti
≡ , i = 0, . . . , n.
i! i!
But, for power basis,
P (i) (0)
= pi
i!
so
B (i) (0)
pi =
, i = 0, . . . , n. (3.1)
i!
The terms B (i) (0) can be found by setting up a difference table. Remember from our study of
hodographs that the coefficients of the derivative of a polynomial in Bernstein form (for example,
the x or y component of a Bézier curve) are:
n(b1 − b0 ), n(b2 − b1 ), . . . , n(bn − bn−1 ).
The coefficients of the second derivative are:
n(n − 1)(b2 − 2b1 + b0 ), n(n − 1)(b3 − 2b2 + b1 ), . . . , n(n − 1)(bn − 2bn−1 + bn−2 ).
Pn
Since B(0) = i=0 bi ni (1 − 0)n−i 0i = b0 , we have
Thus, to perform Bernstein to power basis conversion, load theBernstein coefficients into the top row
and compute the difference table. Scale the left column by ni , and you have the power coefficients.
To perform power to Bernstein conversion, divide the power coefficients by ni , load them into
the left column, compute the difference table backwards, and read the Bernstein coefficients off the
top row.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
44 Basis Conversion
as a rational Bézier curve. Begin by placing the power-basis coefficients in the left column, divide
by ni , then complete the difference table:
(1, 2, 1)/ 30 =
(1, 2, 1) (9, 12, 3) (4, 3, 1) (6, 2, 2)
(24, 30, 6)/ 31 =
(8, 10, 2) (−5, −9, −2) (2, −1, 1)
3
(−39, −57, −12)/ 2 = (−13, −19, −4) (7, 8, 3)
3
(20, 27, 7)/ 3 = (20, 27, 7)
The control points and weights are found on the top row (the weights are multiplied times the control
point coordinates). Thus, for this example,
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 4
Forward Differencing
Horner’s algorithm is the fastest method for evaluating a polynomial at a single point. For a degree
n polynomial, it requires n multiplies and n adds.
If a polynomial is to be evaluated at several evenly spaced values t, t + δ, t + 2δ, . . . , t + kδ, the
fastest method is to use forward differences.
Consider a degree 1 polynomial
f (t) = a0 + a1 t.
The difference between two adjacent function values is
Thus, f (t) can be evaluated at several evenly spaced points using the algorithm:
∆1 = a1 δ
t0 = 0
f (0) = a0
for i = 1 to k do
ti = ti−1 + δ
f (ti ) = f (ti−1 ) + ∆1
endfor
Thus, each successive evaluation requires only one add, as opposed to one add and one multiply
for Horner’s algorithm.
This idea extends to polynomials of any degree. For the quadratic case,
f (t) = a0 + a1 t + a2 t2 .
45
46
t0 = 0
f (0) = a0
for i = 1 to k do
ti = ti−1 + δ
∆1 (ti ) = a1 δ + a2 δ 2 + 2a2 ti−1 δ
f (ti ) = f (ti−1 ) + ∆1 (ti−1 )
endfor
t0 = 0
f (0) = a0
∆1 = a1 δ + a2 δ 2
∆2 = 2a2 δ 2
for i = 1 to k do
ti = ti−1 + δ
f (ti ) = f (ti−1 ) + ∆1
∆1 = ∆1 + ∆2
endfor
It should be clear that for a degree n polynomial, each successive evaluation requires n adds and no
multiplies! For a cubic polynomial
f (t) = a0 + a1 t + a2 t2 + a3 t3 ,
t0 = 0
f (0) = a0
∆1 = a1 δ + a2 δ 2 + a3 δ 3
∆2 = 2a2 δ 2 + 6a3 δ 3
∆3 = 6a3 δ 3
for i = 1 to k do
ti = ti−1 + δ
f (ti ) = f (ti−1 ) + ∆1
∆1 = ∆1 + ∆2
∆2 = ∆2 + ∆3
endfor
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
47
Several questions remain. First, what are the initial values for the ∆i if we want to start at
some value other than t = 0. Second, what is a general equation for the ∆i for a general degree n
polynomial f (t). Also, what if our polynomial is not in power basis.
These questions can be answered almost trivially by observing the following. Since ti+1 = ti + δ,
we have
∆1 (ti ) = f (ti+1 ) − f (t);
∆j (ti ) = ∆j−1 (ti+1 ) − ∆j−1 (ti ), j = 2, . . . , n;
∆n (ti ) = ∆n (ti+1 ) = ∆n (ti+k ) = a constant
∆n+1 = 0
Thus, our initial values for ∆j (ti ) can be found by simply computing f (ti ), f (ti+1 ), . . . , f (ti+n )
and from them computing the initial differences. This lends itself nicely to a table. Here is the table
for a degree four case:
To compute f (ti+5 ), we simply note that every number R in this table, along with its right hand
neighbor Rright and the number directly beneath it Rdown obey the rule
Rright = R + Rdown .
∆4 (ti+1 ) = ∆4 (ti ) + 0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
48 Choosing δ
Example
For a certain cubic polynomial f (t), we have:
t: 1 2 3 4 5
f (t) : 1 2 4 x 15
∆1 (t) : 1 2 x−4 15 − x
∆2 (t) : 1 x−6 19 − 2x
∆3 (t) : x−7 25 − 3x
∆4 (t) : 32 − 4x
For a cubic polynomial, ∆4 (t) = 0, so 32 − 4x = 0 and x = 8.
4.1 Choosing δ
This raises the important question of how to select an appropriate value for δ when using forward
differencing to plot a curve. One way to determine δ is so that distance from the the curve to its
polygonal approximation lies within a tolerance. A discussion of how to chose δ that will satisfy
such a requirement is found in Section 10.6.
A second criterion that might be used to choose δ arises in the problem of rasterizing a curve.
This means to “turn on” a contiguous series of pixels that the curve passes through, without any
gaps. If the control points of the degree n Bézier curve are Pi = (xi , yi ) in pixel coordinates, then
let
d = max{xi − xi−1 , yi − yi−1 } i = 1, . . . , n
If you now evaluate the curve at n ∗ d + 1 evenly spaced values of t and paint each resulting pixel,
there will be no gaps in the drawing of the curve. Another way to say this, compute
1
δ= .
n∗d
Then, compute the points P(i ∗ δ), i = 0 . . . , n ∗ d. Note that n ∗ d is an upper bound on the
magnitude of the x or y component of the first derivative of the curve.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 5
We have just studied how the Bernstein polynomials serve very nicely as blending functions. We
have noted that a degree n Bézier curve always begins at P0 and ends at Pn . Also, the curve is
always tangent to the control polygon at P0 and Pn .
Other popular blending functions exist for defining curves. In fact, you can easily make up your
own set of blending functions. And by following a few simple rules, you can actually create a new
type of free-form curve which has desirable properties.
Consider a set of control points Pi , i = 0, ..., n and blending functions fi (t) which define the
curve
X n
P(t) = fi (t)Pi .
i=0
We can select our blending functions such that the curve has any or all of the following properties:
1. Coordinate system independence. This means that the curve will not change if the
coordinate system is changed. In other words, imagine that the control points are drawn on
a piece of paper and we move that piece of paper around so that the (x, y) coordinates of the
control points change. It would be nice if the curve did not change relative to the control
points. Actually, if we were to pick an arbitrary set of blending functions, the curve would
change. In order to provide coordinate system independence, the blending functions must
form a partition of unity, which is math jargon that means that the blending functions sum
identically sum to one:
Xn
fi (t) ≡ 1.
i=0
2. Convex hull property. The convex hull property was introduced in Section 2.5. This
property exists in curves which are coordinate system independent and for which the blending
functions are all non- negative:
n
X
fi (t) ≡ 1; fi (t) ≥ 0, 0 ≤ t ≤ 1, i = 0, ..., n
i=0
49
50
3. Symmetry. Curves which are symmetric do not change if the control points are ordered in
reverse sequence. For a curve whose domain is [0, 1], symmetry is assured if and only if
n
X n
X
fi (t)Pi ≡ fi (1 − t)Pn−i .
i=0 i=0
This holds if
fi (t) = fn−i (1 − t).
For a curve whose domain is [t0 , t1 ], symmetry requires
n
X n
X
fi (t)Pi ≡ fi (t0 + t1 − t)Pn−i .
i=0 i=0
4. Variation Diminishing Property. This is a property which is obeyed by Bézier curves and
B-spline curves. It states that if a given straight line intersects the curve in c number of points
and the control polygon in p number of points, then it will always hold that
c = p − 2j
where j is zero or a positive integer. This has the practical interpretation that a curve which
c=3
p=5
j=1
obeys the variation diminishing property will “wiggle” no more than the control polygon.
The conditions under which a curve will obey the variation diminishing property are rather
complicated. Suffice it to say that Bézier curves and B-spline curves obey this property, and
most other curves do not.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
51
Linearly independent blending functions are desirable for many reasons. For example,if they
are not linearly independent, it is possible to express one blending function in terms of the
other ones. This has the practical disadvantage that any given curve can be represented by
infinitely many different control point positions. It also means that, for certain control point
arrangements, the curve collapses to a single point, even though the control points are not all
at that point.
If a set of blending functions are linearly independent, they can be called basis functions. Thus,
Bernstein polynomials are basis functions for Bézier curves, and B-spline blending functions
are basis functions.
6. Endpoint Interpolation If a curve over the domain [t0 , t1 ] is to pass through the first and
last control points, as in the case of Bézier curves, the following conditions must be met:
Any set of blending functions can be analyzed in terms of the above properties.
Example
Check which of the above-mentioned properties are obeyed by the sample curve
t2 − 2t + 1 2t − 2t2 2t2
P(t) = f0 (t)P0 + f1 (t)P1 + f2 (t)P2 = 2
P0 + 2 P1 + 2 P2
t +1 t +1 t +1
Answer:
This curve is coordinate system independent because
t2 − 2t + 1 2t − 2t2 2t2 t2 + 1
2
+ 2 + 2 = 2 ≡ 1.
t +1 t +1 t +1 t +1
The curve also obeys the convex hull property because its blending functions are non-negative
for t ∈ [0, 1]. This is most easily seen by factoring the blending functions:
t2 − 2t + 1 (t − 1)2
2
= 2
t +1 t +1
is non-negative for any real number because the square of a real number is always non-negative.
2t − 2t2 2t(1 − t)
= 2
t2 + 1 t +1
is clearly non-negative for t ∈ [0, 1].
The curve is not symmetric because
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
52 Timmer’s Parametric Cubic
Variation diminishing is very difficult to prove, and will not be attempted here.
Linear independence is assessed by checking if there exist constants c0 , c1 , c2 , not all zero, for
which
t2 − 2t + 1 2t − 2t2 2t2
c0 + c1 + c2 ≡ 0.
t2 + 1 t2 + 1 t2 + 1
This is equivalent to
c0 (t2 − 2t + 1) + c1 (2t − 2t2 ) + c2 (2t2 ) = (c0 − 2c1 + 2c2 )t2 + (−2c0 + 2c1 )t + c0 ≡ 0
There is no solution to this set of linear equations, other than c0 = c1 = c2 = 0, so we conclude that
these blending functions are linearly independent.
The curve does interpolate the endpoints, because
The Bézier and B-spline curves are currently the most popular curve forms. Historically, other
curve forms evolved independently at several different industrial sites, each faced with the common
problem of making free-form curves accessible to designers. In this section, we will review three
such curves: Timmer’s Parametric Cubic, Ball’s Cubic, and the Overhauser curve. Each of these
curves is coordinate system independent and symmetric, but only Ball’s cubic obeys the convex hull
property.
Timmer’s Parametric Cubic (or PC) was created by Harry Timmer of McDonnell Douglas [Tim80].
It was modeled after the Bézier curve. Timmer felt that he could improve upon the Bézier curve
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Ball’s Rational Cubic 53
if he could make it follow the control polygon more tightly. This he did by forcing the curve to
interpolate the endpoints of the control polygon and to be tangent to the control polygon at those
points (just like Bézier curves) and in addition, he forced the curve to go through the midpoint of
the line segment P1 - P2 . The resulting blending functions are:
Example Problem
Given a Timmer curve with control points Q0 , Q1 , Q2 , Q3 , find the control points P0 , P1 , P2 , P3
of an equivalent cubic Bézier curve P(t).
Solution
Note that if P(t) ≡ Q(t),then P(0) = Q(0), P(1) = Q(1), P0 (0) = Q0 (0), and P0 (1) = Q0 (1). This
strategy provides a simple way to perform the conversion.
P(0) = Q(0) → P0 = Q0 .
P(1) = Q(1) → P3 = Q3 .
For derivatives, we differentiate the Timmer basis functions (it does not work to use the Bézier
hodograph):
Q0 (t) = (−6t2 + 10t − 4)Q0 + (12t2 − 16t + 4)Q1 + (−12t2 + 8t)Q2 + (6t2 − 2t)Q3
P0 + 3P1
P0 (0) = Q0 (0) → 3(P1 − P0 ) = 4(Q1 − Q0 ) → Q1 =
4
P3 + 3P2
P0 (1) = Q0 (1) → 3(P3 − P2 ) = 4(Q3 − Q2 ) → Q2 =
4
f0 (t) = (1 − t)2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
54 Overhauser Curves
f3 (t) = t2
Notice that if P1 = P2 , then the curve becomes a quadratic Bézier curve:
P0 (1 − t)2 + P1 2t(1 − t)2 + P1 2t2 (1 − t) + P3 t2
= P0 (1 − t)2 + P1 [2t(1 − t)2 + 2t2 (1 − t)] + P3 t2
= P0 (1 − t)2 + P1 2t(1 − t) + P3 t2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Overhauser Curves 55
1
P0 (1) =
(P3 − P1 )
2
This means that a second curve segment will be tangent to the first curve segment if its first three
control points are identical to the last three control points of the first curve. This is illustrated in
Fig. 5.4.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
56 Overhauser Curves
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 6
B-Spline Curves
Most shapes are too complicated to define using a single Bézier curve. A spline curve is a sequence
of curve segments that are connected together to form a single continuous curve. For example, a
piecewise collection of Bézier curves, connected end to end, can be called a spline curve. Over-
hauser curves are another example of splines. The word “spline” is sometimes used as a verb, as in
“Spline together some cubic Bézier curves.” In approximation theory, spline is defined as a piecewise
polynomial of degree n whose segments are C n−1 .
The word “spline” comes from the ship building industry, where it originally referred to a thin
strip of wood which draftsmen would use like a flexible French curve. Metal weights (called ducks)
were placed on the drawing surface and the spline was threaded between the ducks as in Figure 6.1.
We know from structural mechanics that the bending moment M is an infinitely continuous function
along the spline except at a duck, where M is generally only C 0 continuous. Since the curvature of
the spline is proportional to M (κ = M/EI), the spline is everywhere curvature continuous.
Curvature continuity is an important requirement for the ship building industry, as well as for
many other applications. For example, railroad tracks are always curvature continuous, or else a
moving train would experience severe jolts. Car bodies are G2 smooth, or else the reflection of
straight lines would appear to be G0 .
While C 1 continuity is straightforward to attain using Bézier curves (for example, popular design
software such as Adobe Illustrator use Bézier curves and automatically impose tangent continuity
as you sketch), C 2 and higher continuity is cumbersome. This is where B-spline curves come in.
B-spline curves can be thought of as a method for defining a sequence of degree n Bézier curves that
join automatically with C n−1 continuity, regardless of where the control points are placed.
Whereas an open string of m Bézier curves of degree n involve nm + 1 distinct control points
(shared control points counted only once), that same string of Bézier curves can be expressed using
57
58 Polar Form
only m + n B-spline control points (assuming all neighboring curves are C n−1 ). The most important
operation you need to understand to have a working knowledge of B-splines is how to extract the
contituent Bézier curves. The traditional approach to teaching about B-Splines centered on basis
functions and recurrence relations. Experience has shown that polar form (Section 6.1) and knot
intervals (Section 6.13) provide students with such a working knowledge more quickly than recurrence
relations.
P(3,4,5)
P(2,3,4) t=4
t=3
P(0,2,2)
P(1,2,3)
P(2,2,2)
P(0,0,2) t=5
P(2,2,3)
P(6,7,8) t=6
P(4,5,6)
P(5,6,7)
P(0,0,0) P(3,3,3)
P(2,3,3) Knot Vector = [1,2,3,4,5,6,7,8]
(a) Bézier curves with polar labels. (b) B-Spline Curve with Polar Labels
Figure 6.2.a shows two cubic Bézier curves labeled using polar values. The first curve is defined
over the parameter interval [0, 2] and the second curve is defined over the parameter interval [2, 3].
Note that P(t, t, . . . , t) is the point on a Bézier curve corresponding to parameter value t.
2. For a degree n B-spline with a knot vector (see Section 6.2) of
[t1 , t2 , t3 , t4 , . . .],
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Polar Form 59
the arguments of the polar values consist of groups of n adjacent knots from the knot vector, with
the ith polar value being P(ti , . . . , ti+n−1 ), as in Figure 6.2.b.
3. A polar value is symmetric in its arguments. This means that the order of the arguments can be
changed without changing the polar value. For example,
4. Given P(u1 , u2 , . . . , un−1 , a) and P(u1 , u2 , . . . , un−1 , b) we can compute P(u1 , u2 , . . . , un−1 , c)
where c is any value:
P(u1 , u2 , . . . , un−1 , c) =
(b − c)P(u1 , u2 , . . . , un−1 , a) + (c − a)P(u1 , u2 , . . . , un−1 , b)
b−a
P(u1 , u2 , . . . , un−1 , c) is said to be an affine combination of P(u1 , u2 , . . . , un−1 , a) and P(u1 , u2 ,
. . . , un−1 , b). For example,
P(6,c,d)
P(5,c,d)
P(4,c,d)
P(3,c,d)
P(2,c,d)
P(1,c,d)
P(0,c,d)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
60 Knot Vectors
and
P(t, t, t), P(t, t, 1), P(t, 1, 1), P(1, 1, 1).
These new control points can be derived by applying the symmetry and affine map rules for polar
values. Refering to Figure 6.4, we can compute
STEP 1.
P(0,1,1)
P(0,t,1)
P(1) = P(1,1,1)
P(0) = P(0,0,0)
t = .6
[t1 , t2 , 1, 2, 4, 5, 8, t8 , t9 ].
Notice that there are two (one less than the degree) extra knots prepended and appended to the knot
vector. These knots control the end conditions of the B-spline curve, as discussed in Section 6.6.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Extracting Bézier Curves from B-splines 61
For historical reasons, knot vectors are traditionally described as requiring n end-condition knots,
and in the real world you will always find a (meaningless) additional knot at the beginning and end
of a knot vector. For example, the knot vector in Figure 6.2.b would be [t1 , 1, 2, 3, 4, 5, 6, 7, 8, t10 ],
where the values of t1 and t10 have absolutely no effect on the curve. Therefore, we ignore these
dummy knot values in our discussion, but be aware that they appear in B-spline literature and
software.
Obviously, a knot vector must be non-decreasing sequence of real numbers. If any knot value is
repeated, it is referred to as a multiple knot. More on that in Section 6.4. A B-spline curve whose
knot vector is evenly spaced is known as a uniform B-spline. If the knot vector is not evenly spaced,
the curve is called a non-uniform B-spline.
Before we can locate P(3, 3, 3) and P(4, 4, 4), we must find the auxilliary points P(3, 2, 3) (2/3
of the way from P(1, 2, 3) to P(4, 2, 3)) and P(4, 4, 5) (2/3 of the way from P(3, 4, 5) to P(6, 4, 5))
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
62 Multiple knots
as shown in Figure 6.5.b. Finally, P(3, 3, 3) is seen to be half way between P(3, 2, 3) and P(3, 3, 4),
and P(4, 4, 4) is seen to be half way between P(3, 4, 4) and P(4, 4, 5).
Note that the four Bézier control points were derived from exactly four B-spline control points;
P(5, 6, 7) and P(6, 7, 8) were not involved. This means that P(5, 6, 7) and P(6, 7, 8) can be moved
without affecting the Bézier curve over [3, 4]. In general, the Bézier curve over [ti , ti+1 ] is only
influenced by B-spline control points that have ti or ti+1 as one of the polar value parameters. For
this reason, B-splines are said to possess the property of local control, since any given control point
can influence at most n curve segments.
multiple knot diminishes the continuity between adjacent Bézier curves. The continuity across a
knot of multiplicity k is generally n − k.
6.4.1 Labelling
With Bézier curves, we label the control points starting with P0 . With B-spline curves, we will
denote the first control points by P1 and the first knot by t1 .
For a degree-n B-spline curve with c control points and k knot values,
k = n + c − 1.
This B-spline curve can be decomposed into c − n Bézier curves, some of which may be degenerate
if there are multiple knots.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Bézier end conditions 63
P(11,12,14) P(0,1,3)
P(10,11,12) P(4,5,7) P(0,0,1)
P(3,4,5) t=1
t=5,12
t=4,11
P(0,0,0) t=0
t=10
P(8,10,11) t=4
P(4,4,4) t=3
P(1,3,4) t=7
t=8
P(5,7,8) P(1,3,4)
P(7,8,10) P(3,4,4)
Knot Vector = [1 3 4 5 7 8 10 11 12 14]
Knot Vector = [0,0,0,1,3,4,4,4]
(a) Periodic B-Spline. (b) Bézier End Conditions.
Example
This degree four polynomial Bézier curve begins at t = 1 and ends at t = 5, and is therefore also
a B-spline with knot vector [11115555]. Insert a knot at t = 3. State the control point coordinates
and knot vector after this knot insertion is performed.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
64 The de Boor algorithm
P(0,1,2) P(0,1,3)
Initial After Knot Insertion
P(0,0,1)
Knot Vector: [(0,0,0,1,3,4,4,4)] [(0,0,0,1,2,3,4,4,4)] t=1
Control Points: P(0,0,0) P(0,0,0)
P(0,0,1) P(0,0,1) t=2 P(1,2,3)
P(0,1,2) P(0,0,0) t=0
P(4,4,4) t=4
P(0,1,3)
P(1,2,3) t=3
P(1,3,4) P(3,4,4) P(1,3,4)
P(2,3,4) P(2,3,4)
P(3,4,4) P(3,4,4) Old Knot Vector = [0,0,0,1,3,4,4,4]
P(4,4,4) P(4,4,4) New Knot Vector = [0,0,0,1,2,3,4,4,4]
(a) Knots and Polar Labels. (b) Control Points.
P2 = (4,7)
P3 = (7,4)
P1 = (1,4)
P0 = (1,1) P4 = (7,1)
Solution
The control points whose polar labels are f (1, 1, 1, 5) = (1, 4), f (1, 1, 5, 5) = (4, 7) and f (1, 5, 5, 5) =
(7, 4) will be replaced with polar labels f (1, 1, 1, 3) = (1, 2.5), f (1, 1, 3, 5) = (2.5, 5.5), f (1, 3, 5, 5) =
(5.5, 5.5), and f (3, 5, 5, 5) = (7, 2.5).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
B-spline hodographs 65
P(0,1,2) P(0,1,3)
P(0,0,1)
P(1,2,2)
P(2,2,2) P(1,2,3)
P(0,0,0) t=0
P(2,2,3)
P(4,4,4) t=4
P(3,4,4) P(1,3,4)
P(2,3,4)
Old Knot Vector = [0,0,0,1,3,4,4,4]
New Knot Vector = [0,0,0,1,2,2,2,3,4,4,4]
(Pi+1 − Pi )
Hi = n (6.2)
ti+n − ti
p[t, . . . , t] = p(t).
p[t1 , . . . , tn ] is said to be symmetric because the value of the polynomial will not change if the
arguments are permuted. For example, if n = 3, p[a, b, c] = p[b, c, a] = p[c, a, b] etc.
A symmetric polynomial has the form
n
X
p[t1 , . . . , tn ] = ci pi [t1 , . . . , tn ]
i=0
where
Pn
j=1 tj pi−1 [t1 , . . . , tj−1 , tj+1 , . . . , tn ]
p0 [t1 , . . . , tn ] = 1; pi [t1 , . . . , tn ] = , i = 1, . . . n.
n
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
66 Combining Bézier curves into a B-spline
For example,
p[t1 ] = c0 + c1 t1 ,
t1 + t2
p[t1 , t2 ] = c0 + c1 + c2 t1 t2 ,
2
t1 + t2 + t3 t1 t2 + t1 t3 + t2 t3
p[t1 , t2 , t3 ] = c0 + c1 + c2 + c3 t 1 t 2 t 3 ,
3 3
and
t1 + t2 + t3 + t4 t1 t2 + t1 t3 + t1 t4 + t2 t3 + t2 t4 + t3 t4
p[t1 , t2 , t3 , t4 ] = c0 + c1 + c2
4 6
t1 t2 t3 + t1 t2 t4 + t1 t3 t4 + t2 t3 t4
+c3 + c4 t1 t2 t3 t4 .
4
The symmetric polynomial b[t1 , . . . tn ] for which p[t, . . . t] = p(t) is referred to as the polar form or
blossom of p(t).
Theorem For every degree m polynomial p(t) there exists a unique symmetric polynomial p[t1 , . . . , tn ]
of degree n ≥ m such that p[t, . . . , t] = p(t). Furthermore, the coefficients bi of the degree n Bernstein
polynomial over the interval [a, b] are
bi = p[a, . . . , a, b, . . . , b]
| {z } | {z }
n−i i
Example Convert p(t) = t3 + 6t2 + 3t + 1 to a degree 3 Bernstein polynomial over the interval [0, 1].
We use the polar form of p(t): p[t1 , t2 , t3 ] = 1 + 3 t1 +t32 +t3 + 6 t1 t2 +t13t3 +t2 t3 + t1 t2 t3 . Then,
Q0 = Pn , Q1 , Q2 , Q3 .
Then, depending on the continuity order between the B-spline and the Bézier curve, the B-spline
after appending the Bézier becomes
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Knot Intervals 67
C 0 continuity occurs if control points Pn−1 , Pn , and Q1 are not collinear. If they are collinear, then
the value of knot e is chosen so as to satisfy
This provides for C 1 (not merely G1 ) continuity. T OL is a small number which is needed to account
for floating point error. An appropriate value for T OL is the width of the reverse map of a pixel
into world space.
C 2 continuity occurs if, in addition to C 1 continuity, the relationship
|(Pn−2 − Q2 )(ki+1 − ki−1 )(ki+1 − e) + (Pn−1 − Pn−2 )(e − ki−1 )(ki+1 − e) + (Q2 − Q1 )(ki − e)(ki+1 − ki−1 )| < T OL.
is satisfied, where
(e − ki−2 )Pn−2 + (ki−1 − e)Pn−3
Pβ =
ki−1 − ki−2
and
(ki+1 − ki )Q3 + (ki − e)Q2
Pγ =
ki+1 − e
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
68 Knot Intervals
Knot intervals contain all of the information that a knot vector contains, with the exception
of a knot origin. This is not a problem, since the appearance of a B-spline curve is invariant
under linear transformation of the knot vector—that is, if you add any constant to each knot the
curve’s appearance does not change. B-splines originated in the field of approximation theory and
were initially used to approximate functions. In that context, parameter values are important, and
hence, knot values are significant. However, in curve and surface shape design, we are almost never
concerned about absolute parameter values.
For odd-degree B-spline curves, the knot interval di is assigned to the control polygon edge
Pi —Pi+1 . For even-degree B-spline curves, knot interval di is assigned to control point Pi . Each
vertex (for even degree) or edge (for odd degree) has exactly one knot interval. If the B-spline is
not periodic, n−1
2 “end-condition” knot intervals must be assigned past each of the two end control
points. They can simply be written adjacent to “phantom” edges or vertices sketched adjacent to
the end control points; the geometric positions of those phantom edges or vertices are immaterial.
P(3,4,6) d1=1 P2
P1
P(2,3,4) t=4 d0=1 t=4
t=3 d-1=1 t=3
P0 d2=2
P(1,2,3) t=6 t=6
d5=1 P5
P(9,10,11) t=9 t=9
d4=1
P(4,6,9) P4 P3
P(6,9,10) d3=3
Figure 6.11 shows a cubic B-spline curve. The control points in Figure 6.11.a are labeled with
polar values, and Figure 6.11.b shows the control polygon edges labeled with knot intervals. End-
condition knots require that we hang one knot interval off each end of the control polygon. Note
the relationship between the knot vector and the knot intervals: Each knot interval is the difference
between two consecutive knots in the knot vector.
For periodic B-splines, things are even simpler, since we don’t need to deal with end conditions.
Figure 6.12 shows two cubic periodic B-splines labelled with knot intervals. In this example, note
P1 P1
d0= 1
d1= 1 d0= 2
d1= 3
P0 P2 P0 P2
d4= 1 d2= 1
d4= 1 d2= 2
P4 P3 P4 P3
d3= 1 d3= 1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Knot Intervals 69
that as knot interval d1 changes from 1 to 3, the length of the corresponding curve segment increases.
P1 P1
d0= 0 d1= 1
d0= 0 d1= 0
P0 P2 P0 P2
d2= 1
d4= 1
d4= 1 d 2= 1
P4 P3 P4 P3
d3= 1 d3= 1
Figure 6.13 shows two periodic B-splines with a double knot (imposed by setting d0 = 0) and a
triple knot (set d0 = d1 = 0).
In order to determine formulae for operations such as knot insertion in terms of knot intervals,
it is helpful to infer polar labels for the control points. Polar algebra [Ram89b] can then be used to
create the desired formula. The arguments of the polar labels are sums of knot intervals. We are
P1 f(0,d0,d0+d1)
d0 d1 d0 d1
P0 f(-d4,0,d0)
P2 f(d0,d0+d1,d0+d1+d2)
d4 d2 d4 d2
P4 d3 P3 P4 d3 f(d0+d1,d0+d1+d2,d0+d1+d2+d3)
b
free to choose any knot origin. For the example in Figure 6.14, we choose the knot origin to coincide
with control points P0 . Then the polar values are as shown in Figure 6.14.b.
The following subsections show how to perform knot insertion and interval halving, and how
to compute hodographs using knot intervals. These formulae can be verified using polar labels.
The expressions for these operations written in terms of knot vectors can be found, for example,
in [HL93].
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
70 Knot Intervals
Using knot intervals, it is more natural to speak of interval splitting than of knot insertion. For
example, Figure 6.15 shows a cubic periodic B-Spline in which the red knot interval is split into two
knot intervals that sum to the original knot interval. The only question we need to address is, how
can we compute the Cartesian coordinates of the white control points in Figure 6.15.b.
3 1
2
2
1
1
2 2
(a) Periodic Cubic B-Spline Labeled with Knot In- (b) Splitting Interval 3 into Intervals 1 and 2.
tervals.
Figure 6.16 illustrates how to compute those control points. Split the white, red, and green edges
of the control polygon into three segments each whose lengths are proportional to the neighboring
knot intervals, as shown in Figure 6.16.a. Each of those three edges contains a segment labeled
with a red “3.” Split each of those segments into two pieces whose lengths are proportional to 1:2,
as shown in Figure 6.16.b. This produces the three desired control points. Figure 6.17 shows the
procedure for splitting the interval “3” into two equal intervals.
An important special case involves inserting a zero knot interval. In knot vector jargon, this is
the same as inserting a double knot. In knot interval jargon, we can say that we are splitting a knot
interval into two intervals, one of which is zero, and the other of which is the original knot interval.
This special case is illustrated in Figure 6.18.a and Figure 6.18.b. If we repeat this operation three
more times, arriving at the knot interval configuration shown in Figure 6.18.c, we uncover the Bézier
control points for the red Bézier curve. The reason for this will be clear if you recall that a Bézier
curve is a special case of B-Spline curve with knot vector [a, a, a, b, b, b]. Converting from knot vector
to knot interval notation, we see that the two pairs of adjacent zero knot interval in Figure 6.18.c
represent two sets of triple knots in the knot vector.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Knot Intervals 71
2
2 3 2
3
2
3 1
1
2
2
2
1
1
1
3
2
1
1
1
2
2
2
(a) Dividing Edges of the Control Polygon into Three (b) Splitting Intervals Labeled with a 3 into Intervals
Segments Whose Lengths are Proportional to the 1 and 2.
Neighboring Knot Intervals.
1.5 2
5
1.
1.5
5
1.
2
1.5
2
1.5
1
1
1.5
1.5
1
1
1
2
(a) Splitting the Interval Labeled with a 3 into In- (b) Construction.
tervals 1.5 and 1.5.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
72 Knot Intervals
0
3 0 0
3
3
2
2
0
2
1
0
0
0
1
1
10
1
1
2
2 2
(a) Splitting the Interval La- (b) Construction. (c) Bézier control points.
beled with a 3 into Intervals 3
and 0.
the placement of the new control points becomes a function of the knot interval values. If each knot
interval is cut in halve, the resulting control polygon has twice as many control points, and their
coordinates Qk are:
For non-uniform cubic periodic B-spline curves, interval halving produces a new control point
corresponding to each edge, and a new control point corresponding to each original control point.
The equations for the new control points Qk generated by interval halving are:
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Knot Intervals 73
Q2i
di-1
Q2i+1
Q2i-1 di-1/2 di/2 di
Pi-1 Pi+1
di 2 di 1
3 3
2 1 2 0
1 2 1 2
(a) Example 1. (b) Example with Zero Knot Interval.
Figure 6.22 illustrates how to perform interval splitting for a quadratic B-Spline. Figure 6.23
illustrates how to split off a zero-knot interval on a quadratic B-Spline. To find the Bézier control
points in a quadratic B-Spline, it suffices to insert a single zero knot interval on each side of a
non-zero knot interval.
6.13.4 Hodographs
Section 2.7 discusses the hodograph of a polynomial Bézier curve. The hodograph of a polynomial
B-Spline curve can be constructed in a similar manner.
Figure 6.24 shows a cubic B-Spline curve and its hodograph, represented as a degree-two B-Spline
curve. Note the relationship between the knot vectors in the original curve and in its hodograph.
The control points for the hodograph are found in a manner similar to the control points for a Bézier
hodograph.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
74 Knot Intervals
3
1.5
5
1.
1.5 1.5
1.5
5
1.
1
2
2 1 2 1
1 2 1 2
(a) Splitting the Knot Interval 3 into two (b) Construction for the Interval Splitting.
equal knot intervals.
3 3
0
3
3
0
0 1
2
2 1 2 1
1 2 1 2
(a) Splitting the Knot Interval 3 into two (b) Construction for the Interval Splitting.
equal knot intervals.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Knot Intervals 75
3 1 2
2
2
1 3
1
1
Hodograph
2
.
V
3 3V 3
2
1+2+3
V
(0,0) (0,0)
3V
1
1
2+3+1
(a) (b)
The exact formula for the control points, as illustrated in Figure 6.25, is as follows. The hodo-
graph of a degree n B-spline P(t) with knot intervals di and control points Pi is a B-spline of degree
n − 1 with the same knot intervals di and with control points Qi where
Qi = ci (Pi+1 − Pi ). (6.6)
The scale factor ci is the inverse of the average value of n neighboring knot intervals. Specifically, if
the curve is even-degree n = 2m, then
n
ci =
di−m+1 + . . . + di+m
n
ci =
di−m + . . . + di+m
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
76 Knot Intervals
The procedure of degree elevation on a periodic B-spline that is labeled using knot intervals
results in two effects. First, an additional control point is introduced for each curve segment.
Second, if the sequence of knot intervals is initially d1 , d2 , d3 , . . ., the sequence of knot intervals on
the degree elevated control polygon will be d1 , 0, d2 , 0, d3 , 0, . . .. The zeroes must be added because
degree elevation raises the degree of each curve segment without raising the continuity between curve
segments,
Degree elevation of a degree one B-spline is simple: merely insert a new control point on the
midpoint of each edge of the control polygon. The knot intervals are as shown in Figures 6.26.a and
b.
.
d1 d1 P2 P12 0 P21 d2
0 P1 d2
P2 0 d1 d1
P1 P1 P12 P2 P23
P10
d0 d2 d0
P01 P23 d2 0 0
P01
P0 P3 P0 P3 P0 P3 P32
0 0 d0 d3 d0 d3
d3 d3 P03 0 P30
a. Degree one B-spline b. Degree elevation of (a.) c. Degree two B-spline b. Degree elevation of (c.)
Figure 6.26: Degree elevating a degree one and degree two B-spline.
Degree elevation for a degree two B-spline is illustrated in Figures 6.26.c and d. The new control
points are:
(2di + 3dj )Pi + di Pj
Pi,j = . (6.9)
3di + 3dj
Figure 6.27 illustrates degree elevation from degree three to four. The equations for the new
control points are:
(di + 2di+1 )Pi + (2di−1 + di )Pi+1
Pi,i+1 =
2(di−1 + di + di+1 )
di di−2 + di−1 di + di+1 1 di−1
Qi = Pi−1 + + + Pi + Pi+1
4(di−2 + di−1 + di ) 4(di−2 + di−1 + di ) 4(di−1 + di + di+1 ) 2 4(di−1 + di + di+1 )
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
B-spline Basis Functions 77
P2 d2 P3 d2
0
Q2 0 P23 Q3 d3
d3
P34
d1 d1 P12
P4
0 Q1
P1
d0 P0 d P01
0
The knot vector for this curve contains n + d − 1 knots, which we will denote [t1 , t2 , . . . , tn+d−1 ].
Thus, control point Pi has polar label f (ti , . . . , ti+d−1 ).
Each B-spline basis function Bid (t) can be expressed as an explicit B-spline curve whose x coor-
dinates are the Greville abscissae (Section 6.9) and whose y coordinates are all zero except yi = 1.
Each basis function is a piecewise polynomial that has d + 1 non-zero segments. For example, the
cubic B-spline in Figure 6.28, n = 7 and the knot vector is [0, 0, 0, 2, 3, 4, 5, 5, 5]. The basis function
P4= f(2,3,4)
P6= f(4,5,5)
P2= f(0,0,2)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
78 B-spline Basis Functions
f(5,5,5)
= (5,0) t
f(0,0,0) f(0,0,2) f(2,3,4) f(3,4,5) f(4,5,5)
= (0,0) = (2/3,0) = (3,0) = (4,0) = (14/3,0)
.
The support of a basis function is the set of t values for which the basis function is non-zero. For
a degree-three curve, the basis function for the control point whose polar label is f (tj−1 , tj , tj+1 ) has
support tj−2 < t < tj+2 = (tj−2 , tj+2 ). The domain D of the B-spline curve is the set of t parameter
values over which the curve is defined, so after eliminating the end-condition knots, D = [td , tn ].
Since support has little practical meaning outside the domain of the curve, it is more correct to say
that (tj−2 , tj+2 ) ∩ D is the domain for the basis function for the control point whose polar label is
f (tj−1 , tj , tj+1 ).
In general, for a degree-d B-spline curve, the support of Bin (t) is (ti−1 , ti+d ) ∩ D.
Pi
d i-1 di
P i-1 P i+1
d i+1
P i-2 P i+2
P i+3
.
B(t) is the y-coordinates the curve in Figure 6.31. Those y-coordinates are easily evaluated in
the same manner as you would evaluate a point on any B-Spline curve. Note that the y-coordinates
of the control points of this explicit B-Spline curve are all zero, except for the control point whose
basis function we desire.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
B-spline Basis Functions 79
B(t)
1
d i-1 di
0 t
d i-2 d i+1
. t1 t2 t3 t4 t5
Figure 6.31: B-Spline Basis Function for Control Point Pi in Figure 6.30.
If we now evaluate a point on this explicit B-Spline curve using the knot-interval version of the de
Boor algorithm, we arrive at the following equations for the B-Spline basis function in Figure 6.31.
For t ∈ [t1 , t2 ]:
(t − t1 )3
B(t) = (6.10)
(t4 − t1 )(t3 − t1 )( t2 − t1 )
For t ∈ [t2 , t3 ]:
For t ∈ [t3 , t4 ]:
For t ∈ [t4 , t5 ]:
(t5 − t)3
B(t) = (6.13)
(t5 − t2 )(t5 − t3 )( t5 − t4 )
These four polynomials are C 2 , with
3(t2 − t1 ) 6
B 0 (t1 ) = B 00 (t1 ) = 0, B 0 (t2 ) = , B 00 (t2 ) = ,
(t3 − t1 )(t4 − t1 ) (t3 − t1 )(t4 − t1 )
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
80 B-spline Basis Functions
a B-Spline basis function of degree n over a knot vector {s0 , s1 , . . . , sn+1 } and with support [s0 , sn+1 ].
Upon inserting a knot k for which si ≤ k ≤ si+i , the basis function is split into two scaled basis
functions:
N [s0 , s1 , . . . , sn+1 ](s) = ci N [s0 , . . . , si , k, si+1 , . . . , sn ](s) + di N [s1 , . . . , si , k, si+1 , . . . , sn+1 ](s)
where k−s0
sn+1 −s0 k < sn
ci =
1 k ≥ sn
(
sn+1 −k
sn+1 −s1 k > s1
di =
1 k ≤ s1
where t−ti
if ti 6= ti+k−1
ωik (t) = ti+k−1 −ti
0 otherwise.
A degree one B-spline curve is defined over the interval [ti , ti+1 ] using two control points, which
we will denote as polar values P(ti ) and P(ti+1 ). The curve is simply the line segment joining the
two control points:
ti+1 − t t − ti
P(t) = P(ti ) + P(ti+1 ).
ti+1 − ti ti+1 − ti
A single degree n B-spline curve segment defined over the interval [ti , ti+1 ] with knot vector
{. . . , ti−1 , ti , ti+1 , ti+2 , . . .} has n + 1 control points written as polar values
and blending functions Bin (t) which are obtained from equation 6.14. The equation for the curve is:
n+i
X
n
P(t) = Bj+1−n (t)P(tj+1−n , . . . , tj ) (6.15)
j=i
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
B-spline Basis Functions 81
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
82 B-spline Basis Functions
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 7
Curve intersection involves finding the points at which two planar curves intersect. If the two curves
are parametric, the solution also identifies the parameter values of the intersection points.
83
84 Bezout’s Theorem
(X − xc W )2 + (Y − yc W )2 − r2 W 2 = 0. (7.1)
−t2 + 1 2t
x = y = . (7.2)
t2 + 1 t2 + 1
T
A circle can also be expressed in terms of homogeneous parameters (T, U ) where t = U:
−T 2 + U 2 2T U
x = y = . (7.3)
T2 + U2 T2 + U2
To plot the entire circle using equation (7.2), t would have to range from negative to positive infinity.
An advantage to the homogeneous parameters is that the entire circle can be swept out with finite
parameter values. This is done as follows:
• First Quadrant: 0 ≤ T ≤ 1, U = 1
• Second Quadrant: T = 1, 1 ≥ U ≥ 0
• Fourth Quadrant: −1 ≤ T ≤ 0, U = 1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
The Intersection of Two Lines 85
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
86 Intersection of a Parametric Curve and an Implicit Curve
and L(−1, −1, 5) intersect in a point (2, 1, −7) × (−1, −1, 5) = P(−2, −3, −1). Note that Π(2, 3, 1) =
Π(−2, −3, −1) = (2, 3).
We noted that Bezout’s theorem requires that we properly account for complex, infinite, and
multiple intersections, and that homogeneous equations allow us to deal with points at infinity. We
now illustrate. Students in junior high school algebra courses are taught that there is no solution
for two equations representing the intersection of parallel lines, such as
3x + 4y + 2 = 0, 3x + 4y + 3 = 0.
and
f (x, y) = x2 + y 2 − 1
Then
g(t) = f (x(t), y(t)) = 64t4 − 144t3 + 101t2 − 22t + 1
The roots of g(t) = 0 are t = 0.06118, t = 0.28147, t = 0.90735, and t = 1.0. The Cartesian
coordinates of the intersection points can then be found by evaluating the parametric curve at those
values of t: (−0.8776, 0.47932), (−0.43706, −0.89943), (0.814696, −0.5799), (1, 0).
If the parametric curve is rational,
a(t) b(t)
x= , y=
c(t) c(t)
t2 + t 2t
x= , y=
t2 + 1 t2 + 1
and
f (x, y) = x2 + 2x + y + 1 = 0
we homogenize the implicit curve
f (X, Y, W ) = X 2 + 2XW + Y W + W 2 = 0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Intersection of a Parametric Curve and an Implicit Curve 87
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
88 Computing the Intersection of Two Bézier Curves
For any value of ρ these two curves are tangent continuous. They are curvature continuous if
x21 − 2ρw0 y2 = 0, which happens if
x21
ρ=
2w0 y2
Therefore, the curvature of P(t) at t = 0 is
2w0 y2
κ= .
x21
only reliable for curves of degree up to five using double precision arithmetic. For higher degrees,
it is possible for the polynomial condition to degrade so that no significant digits are obtained in
the answers. For curves of degree less than five, the implicitization algorithm is typically 1-3 times
faster than the Bézier clip algorithm, which in turn is typically 2-10 times faster than the other two
algorithms. For curves of degree higher than four, the Bézier clipping algorithm generally wins.
A brief discussion of these curve intersection methods follows.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Interval subdivision 89
which obeys the convex hull property. Figure 7.1 shows the convex hull of a single Bézier curve, and
the convex hulls after subdividing into two and four pieces.
The intersection algorithm proceeds by comparing the convex hulls of the two curves. If they
do not overlap, the curves do not intersect. If they do overlap, the curves are subdivided and the
two halves of one curve are checked for overlap against the two halves of the other curve. As this
procedure continues, each iteration rejects regions of curves which do not contain intersection points.
Figure 7.2 shows three iterations.
Once a pair of curves has been subdivided enough that they can each be approximated by a line
segment to within a tolerance (as given in equation 10.4), the intersection of the two approximating
line segments is found.
Since convex hulls are rather expensive to compute and to determine overlap, in practice one
normally just uses the x − y bounding boxes.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
90 Bézier Clipping method
expensive de Casteljau algorithm) and that the bounding box is trivial to determine. Figure 7.3
illustrates this bounding box strategy.
d max
d min
_
L
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Bézier Clipping method 91
ax + by + c = 0 (a2 + b2 = 1) (7.4)
d(x, y) = ax + by + c (7.5)
Denote by di = d(xi , yi ) the signed distance from control point Pi = (xi , yi ) to L̄. By the convex
hull property, a fat line bounding a given rational Bézier curve with non-negative weights can be
defined as the fat line parallel to L̄ which most tightly encloses the Bézier control points:
where
dmin = min{d0 , . . . , dn }, dmax = max{d0 , . . . , dn }. (7.7)
=1
d min
2
d2=
= -2
d max
3 Q(u)
d3=
-1
d1= -5
d0=
P(t)
n
where Pi = (xi , yi ) are the Bézier control points, and Bin (t) = i (1 − t)n−i ti denote the Bernstein
basis functions. If the line L̄ through Q0 − Qn is defined by
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
92 Bézier Clipping method
then the distance d(t) from any point P(t) to L̄ can be found by substituting equation 7.8 into
equation 7.9:
Xn
d(t) = di Bin (t), di = axi + byi + c. (7.10)
i=0
Note that d(t) = 0 for all values of t at which P intersects L̄. Also, di is the distance from Pi to L̄
(as shown in Figure 7.5).
The function d(t) is a polynomial in Bernstein form, and can be represented as an explicit Bézier
curve (Section 2.15) as follows:
n
X
D(t) = (t, d(t)) = Di Bin (t). (7.11)
i=0
Figure 7.6 shows the curve D(t) which corresponds to Figure 7.5.
d (1,3)
2
( ,2)
3
1
0 t
( 13 ,-1)
-2
(0,-5)
t=0.25 t=0.75
Values of t for which P(t) lies outside of L correspond to values of t for which D(t) lies above
d = dmax or below d = dmin . We can identify parameter ranges of t for which P(t) is guaranteed
to lie outside of L by identifying ranges of t for which the convex hull of D(t) lies above d = dmax
or below d = dmin . In this example, we are assured that P(t) lies outside of L for parameter values
t < 0.25 and for t > 0.75.
Bézier clipping is completed by subdividing P twice using the de Casteljau algorithm, such that
portions of P over parameter values t < 0.25 and t > 0.75 are removed.
Figure 7.6 shows how to clip against a fat line using a single explicit Bézier curve. This approach
only works for polynomial Bézier curves. For rational Bézier curves, the explicit Bézier curves
generated for each of the two lines are not simple translations of each other, so we must clip against
each of the two lines separately. This is illustrated in Sections 7.7.7 and 7.7.8
7.7.3 Iterating
We have just discussed the notion of Bézier clipping in the context of curve intersection: regions
of one curve which are guaranteed to not intersect a second curve can be identified and subdivided
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Bézier Clipping method 93
away. Our Bézier clipping curve intersection algorithm proceeds by iteratively applying the Bézier
clipping procedure.
Figure 7.7 shows curves P(t) and Q(u) from Figure 7.5 after the first Bézier clipping step in
which regions t < 0.25 and t > 0.75 have been clipped away from P(t). The clipped portions of P(t)
are shown in fine pen width, and a fat line is shown which bounds P(t), 0.25 ≤ t ≤ 0.75. The next
step in the curve intersection algorithm is to perform a Bézier clip of Q(u), clipping away regions
of Q(u) which are guaranteed to lie outside the fat line bounding P(t). Proceeding as before, we
P(t)
Q(u)
define an explicit Bézier curve which expresses the distance from L̄ in Figure 7.7 to the curve Q(u),
from which we conclude that it is safe to clip off regions of Q(u) for which u < .42 and u > .63.
Next, P(t) is again clipped against Q(u), and so forth. After three Bézier clips on each curve,
the intersection is computed to within six digits of accuracy (see Table 7.2).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
94 Bézier Clipping method
cannot converge to a single intersection point. The remedy is to split one of the curves in half and
to compute the intersections of each half with the other curve, as suggested in Figure 7.9. A stack
data structure is used to store pairs of curve segments, as in the conventional divide-and-conquer
intersection algorithm [LR80].
Experimentation suggests the following heuristic. If a Bézier clip fails to reduce the parameter
range of either curve by at least 20%, subdivide the “longest” curve (largest remaining parameter
interval) and intersect the shorter curve respectively with the two halves of the longer curve. This
heuristic, applied recursively if needed, allows computation of arbitrary numbers of intersections.
with control point coordinates Pi = (xi , yi ) and corresponding non-negative weights wi , the Bézier
clip computation is modified as follows. Substituting equation 7.12 into equation 7.9 and clearing
the denominator yields:
n
X
d(t) = di Bin (t), di = wi (axi + byi + c).
i=0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Bézier Clipping method 95
The equation d(t) = 0 expresses the intersection of P(t) with a line ax + by + c = 0. However, unlike
the non-rational case, the intersection of P(t) with a fat line cannot be represented as {(x, y) =
P(t)|dmin ≤ d(t) ≤ dmax }. Instead, P must be clipped independently against each of the two lines
bounding the fat line. Thus, we identify ranges of t for which
n
X
wi (axi + byi + c − dmax )Bin (t) > 0
i=0
or for which
n
X
wi (axi + byi + c + dmin )Bin (t) < 0.
i=0
These ranges are identified using the Bézier clipping technique as previously outlined.
P4=(10,9,1)
P1=3*(4,6,1)
L1=(-6,8,-24)
P =(2,3,1)
0
_ _
L =P0XP4=(-6,8,-12) L =P0XP4=(-6,8,-12)
P2=(4,8,1)
L2=(-6,8,-40)
P3=4*(8,5,1)
_
L =(-6,8,-12) L3=(-6,8,8)
_
L =P0XP4=(-6,8,-12)
To compute a fat line that bounds this curve, begin by computing the base line L̄ = P0 × Pn =
(−6, 8, −12). Then, compute the lines Li , i = 1, . . . , n − 1 that are parallel to L̄ and that pass
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
96 Bézier Clipping method
through Pi . In general, if L̄ = (a, b, c), then Li = (a, b, ci ). Thus, we must solve for ci such that
(a, b, ci ) · Pi = 0. Thus,
ci = −axi − byi .
Call the line with the smallest value of ci Lmin and the line with the largest value of ci Lmax .
We want the curve to lie in the positive half space of each bounding line. It can be shown that this
will happen if we scale Lmin by −1.
Thus, in our example, we have
E4
L04 L03
P1=1*(0,12,1)
P2=2*(5,10,1)
P0=1*(0,10,1)
E3
L02
P3=3*(8,7,1) V4 V3 V2
X=L(0,1,0)
E2
E0
E1
Lmin=(6,-8,40) Lmax=(-6,8,8) L01
P4=3*(11,1,1)
(a) Curve and fat line. (b) Explicit Bézier Curve for Clipping against Lmin .
Figure 7.11.a shows a rational Bézier curve to be clipped against the fat line (7.13). Figure 7.11.b
shows the resulting explicit Bézier curve where
i
Ei = ( , Lmin · Pi , 1).
n
In this example,
1 1 3
E0 = (0, −40, 1), E1 = ( , −56, 1), E2 = ( , −20, 1), E3 = ( , 96, 1), E4 = (1, 294, 1)
4 2 4
Note that we only want to clip away the portions of P(t) that lie in the negative half space of
Lmin . That half space corresponds to the values of t for which the explicit curve is < 0. Therefore,
we can clip away the “left” portion of the curve if and only if E0 lies below the x-axis and we can
clip away the “right” portion of the curve if and only if En lies below the x-axis. So in this example,
we can compute a clip value at the “left” end of the curve, but not the “right” end.
To compute the clip value, we first compute the lines
L0,i = E0 × Ei
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Bézier Clipping method 97
Our “clip” value will be the x-coordinate of the left-most Vi that is to the right of the origin. To
determine this, we must project the homogeneous points Vi to their corresponding Cartesian points
vi which yields:
5 30 40
v1 = (− , 0), v2 = (1, 0), v3 = ( , 0) ≈ (.2206, 0), v4 = ( , 0) ≈ (.1198, 0).
8 136 334
So the desired t value at which to clip against Lmin is .1198, and we can eliminate the domain
t ∈ [0, 0.1198).
We now clip against line Lmax . The explicit Bézier curve is shown in Figure 7.12, for which
i
Ei = ( , Lmax · Pi , 1).
n
In this example,
1 1 3
E0 = (0, 88, 1), E1 = ( , 104, 1), E2 = ( , 116, 1), E3 = ( , 48, 1), E4 = (1, −150, 1)
4 2 4
L42 L43
E1 E2
E0 E3
V0 V3 X=L(0,1,0)
L40
E4
Since E0 is above the x-axis and E4 is below the x-axis, we can clip the right side of the curve
but not the left. We have
3 1 1
L40 = (−238, −1, 88), L41 = (−254, − , 141.5), L42 = (−266, − , 191), L43 = (−198, − , 160.5)
4 2 4
and
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
98 Bézier Clipping method
V1 H E4
E1
E0
When clipping away the right end of the curve, we need to identify the right-most Vi that is to the
left of (1, 0), which in this example is V3 . Thus, we can clip away t ∈ (.8106, 1].
Note that we are not computing the exact intersection between the convex hull and the x-axis,
as illustrated in Figure 7.13, where the algorithm described in this section would compute a clip
value corresponding to V1 , whereas the convex hull crosses the x-axis at H. In our experiments, the
method described here runs faster than the method where we compute the exact intersection with
the convex hull because in most cases the two values are the same and the method described here is
more simple.
E0
E2 E4
E3 E2
E1 V01 V34
E4 E1 E3
E1
E3
E0 E4
E2 E0
(a) Clip away everything. (b) Clip away nothing. (c) Clip to the left of V01 and to
the right of V34 .
A few additional examples are illustrated in Figure 7.14. In Figure 7.14.a, all control points lie
below the x-axis. In this case, there is no intersection. In Figure 7.14.b, E0 and En lie above the
x-axis. In this case, no clipping is performed. In Figure 7.14.c, clipping values are computed for
both the left and right sides of the curve.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 8
Offset Curves
An offset curve is the set of all points that lie a perpendicular distance ρ from a given curve in R2 .
The scalar ρ is called the offset radius. If the parametric equation of the given curve is
Note that in this definition, if ρ is positive, the offset is on our right as we walk along the base curve
in the direction of increasing parameter value.
(a) Offsets of a convex curve. (b) Offset of a curve that has an inflection point.
In Figure 8.1, the red curves are offsets of the black curves.
99
100
Offset curves play an important roll in computer aided design and manufacturing (CAD/CAM).
If a numerically controlled machine is used to cut out a shape, the cutting tool has a finite radius.
Therefore, the path that the tool traverses is an offset curve and the offset radius is the radius of
the cutting tool.
It is important that the tool radius is less than the minimum radius of curvature of the curve,
otherwise the tool will perform unintended gouging. Figure 8.2 illustrates an offset curve whose
radius exceeds the radius of curvature along part of the base curve. Every point at which the radius
of curvature in the base curve matches the offset radius creates a cusp in the offset curve. At the
cusp, the offset curve changes direction. Between cusps, the first derivative vectors of the base curve
and offset curve point in opposite directions.
(a) Offsets of a convex curve. (b) Offset of a curve that has an inflection point.
Figure 8.2: Offset Curves in which the Offset Radius Exceeds the Radius of Curvature for a Portion
of the Base Curve.
If P is an offset of Q, the reverse is generally true, as long as the offset radius is everywhere less
than the radius of curvature of both curve segments:
In general, offset curves cannot be represented in Bézier form because (8.2) contains a square
root of a polynomial. The obvious exceptions are circles and straight lines. A non-obvious exception
is that the offset of any parabola can be represented as a degree eight rational Bézier curve.
In addition, a family of curves has been identified by Rida Farouki [FS90, Far08] which can be
represented in rational Bézier form. There curves are called Pythagorean Hodograph curves, and
they defined by the property that the sum x02 (t) + y 02 (t) is a perfect square of a polynomial.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 9
The Bernstein polynomial basis enjoys widespread use in the fields of CAGD and computer graphics.
The use of the Bernstein basis functions to express Bézier curves and surfaces allows many basic
algorithms concerned with the processing of such forms to be reduced to the problem of computing
the real roots of polynomials in Bernstein form.
A typical example is the problem of computing the intersection points of two Bézier curves using
the implicitization algorithm. Given two curves of degrees m and n, respectively, the problem of
identifying their intersection points can be reformulated in terms of finding the real roots on the
unit interval of a degree mn polynomial in Bernstein form [SP86a]. Other examples from CAGD
include finding a point on each loop of the intersection curve of two surfaces and the “trimming”
of offset and bisector curves. Examples from computer graphics include ray tracing and algebraic
surface rendering.
In the early years of computer graphics and CAGD, the tendency was to convert from the
Bernstein to the power basis for root finding since the power basis is more “familiar” and library
routines are commonly available to solve for polynomial roots in the power basis. However, it has
subsequently been demonstrated [FR87] that the Bernstein basis is inherently better conditioned
than the power basis for finding real roots on the unit interval (and this is all that is of interest when
dealing with Bézier curves anyway). Thus, root finding algorithms for polynomials in Bernstein form
are not merely a convenience, they in fact offer significantly better accuracy than their power basis
counterparts.
Furthermore, by expressing Bernstein form polynomials as explicit Bézier curves, one can take
advantage of geometric insights based on the control polygon in developing root–finding algorithms.
This can allow us to robustly find all real roots in the unit interval, typically much faster than can
a library polynomial root finder which finds all real and complex roots. Thus, a root finder that
works in the Bernstein basis could provide enhanced speed and accuracy when applied to problems
whose solution traditionally relies on the computation of real polynomial roots in the power basis.
A detailed study of root finding algorithms for polynomials in Bernstein form is found in [Spe94].
In this chapter we review two basic approaches. The fundamental idea it to express a polynomial
as an explicit Bézier curve (Section 2.15).
101
102 Convex Hull Marching
The Bernstein convex hull approximating step algorithm finds each real root of [0, 1] in ascending
order by computing a sequence of subdivided explicit Bézier curves which are guaranteed to not skip
over a real root. Each step is determined by exploiting the convex hull property which assures that
all roots lie within the interval where the convex hull of the control polygon intersects the t-axis. A
root is realized when its respective sequence of approximating steps converge to a limit.
This algorithm is quite similar to Newton’s method, but it has the advantage that it always
approaches the root from the left, and hence it cannot diverge like Newton’s method.
This algorithm was first overviewed in [SP86a]. Since then, it has been adopted to various
applications and to higher dimensions under a technique referred to as Bézier clipping [SWZ89,
Sed89, SN90, NSK90].
The algorithm is illustrated in Figure 9.1. Begin by determining the left-most intersection be-
tween the convex-hull of the explicit Bézier curve f[0,1] (t). and the t axis. No roots can exist in
the interval [0, t1 ] in Figure 9.1.a. Next, perform the de Casteljau algorithm (Figure 9.1.b) yielding
f[t1 ,1] (t) and find the value t2 where the new convex hull intersects the t axis. These two operations
are repeated until tk+1 = tk to within floating point tolerance, and tk is taken to be a root. In this
case, k = 6. To within floating point tolerance, f0 = 0 in the explicit Bézier curve f[t6 ,1] (t).
One pitfall to be aware of is that, due to floating point roundoff, it is possible (although rare) for
the algorithm to sneak past a root. To avoid this problem, you should check to make sure that, at
each iteration, f[ti ,1] (ti ) and f[ti+1 ,1] (ti+1 ) have the same sign. If they do not, ti and ti+1 will differ
only by floating point error. You should take f[ti ,1] (ti ) to have a root at ti and proceed with the
deflation step.
When a root is found, it is “deflated” out and the algorithm proceeds as before to find the next
root. Deflation is the process of finding a degree n − 1 polynomial f[t1k ,1] (t)which has the same roots
as f[tk ,1] (t) except for the root at tk . If we denote the deflated polynomial by f[t1k ,1] (t), then
n
yi1 = yi+1 , i = 0, . . . , n − 1.
i+1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Bernstein Combined Subdivide & Derivative Algorithm 103
n
X
f[0,1] (t) = yi Bin (t)
i=1
n
X n
= yi (1 − t)n−i ti
i=1
i
n−1
X n
= t yi+1 (1 − t)n−1−i ti
i=0
i + 1
n−1 n
X i+1
n−1
= t n−1 yi+1 Bi
i=0 i
n−1
X n
= t yi+1 Bin−1
i=0
i+1
(9.1)
This algorithm performs reliably. It is numerically stable. The main drawback is the expense of
doing a de Casteljau subdivision at each step.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
104 Bernstein Combined Subdivide & Derivative Algorithm
f[0,1](t)
(a) 0 1
t1
f[t1,1](t)
(b) 0 1
t2
f[t2,1](t)
(c) 0 1
t6 = t7
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
(a)
(0)
P[0,1] (t)
t
0.2 0.4 0.6 0.8 1.0
(b)
(1)
P[0,1] (t) t
0.2 0.4 0.6 0.8 1.0
(c)
(2)
P[0,τ1](t) t
0.2 0.4 0.6 0.8 1.0
(d)
(3)
P[τ1,1](t) t
0.2 0.4 0.6 0.8 1.0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
106 Bernstein Combined Subdivide & Derivative Algorithm
P (4)(t) t
(e)
0.2 0.4 0.6 0.8 1.0
P (5)(t)
t
(f) 0.2 0.4 0.6 0.8 1.0
P (6)(t)
t
(g) 0.2 0.4 0.6 0.8 1.0
P ’(t)
t
(h) 0.2 0.4 0.6 0.8 1.0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Multiplication of Polynomials in Bernstein Form 107
their product h(t) = f (t)g(t) is a polynomial in Bernstein form of degree m + n whose coefficients
are
m
P n
i+j=k i fi j gj
hk = m+n
k
P
The notation i+j=k means to use all valid values of i and j that add up to k. Denote
m
X
hf0 , f1 , . . . , fm im (t) = fi Bim (t).
i=0
n n−i+1 n
= .
i i i−1
Thus, n0 = 1, n1 = n, n2 = n−1 n
2 1 , etc.
Bernstein-basis polynomials can be defined over any domain [t0 , t1 ], and the equation is given in
Equation 2.3 from Section 2.2 (repeated here for convenience):
Pn n n−i n
i=0 i (t1 − t) (t − t0 )i Pi X n t1 − t n−i t − t0 i
P[t0 ,t1 ] (t) = n
= ( ) ( ) Pi .
(t1 − t0 ) i=0
i t1 − t0 t1 − t0
The algorithm just described for multiplying two Bernstein-basis polynomials over the [0, 1] domain
applies to an arbitrary domain [t0 , t1 ] without modification.
p[t0 ,t1 ] (t) = hx0 − r1 , xn − r1 i[t0 ,t1 ] ∗ hx0 − r2 , xn − r2 i[t0 ,t1 ] ∗ · · · ∗ hx0 − rn , xn − rn i[t0 ,t1 ] .
A Bernstein-basis polynomial P[t0 ,t1 ] (t) can be represented as an explicit Bézier curve by setting the
x-coordinates of the control points equal to xi = t0 + ni (t1 − t0 ).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
108 Intersection between a Line and a Rational Bézier Curve
and a line
ax + by + cw = 0
can be computed by substituting the parametric equation of the curve into the implicit equation of
the line, producing a polynomial in Bernstein form
n
X
f (t) = fi Bin (t), fi = axi wi + byi wi + cwi .
i=0
The roots of f (t) give the parameter values of the points at which the curve intersects the line.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 10
Polynomial Interpolation
(2,4)
t=1
(0, 3)
t = 3/4
(2, 2)
t = 1/4
(0, 0)
t=0
We can now pick any form we wish for the parametric equations. Let’s first see how it is done
for standard power basis polynomials, and then we will solve the same problem using Bernstein
109
110 Undetermined Coefficients
polynomials. For power basis polynomials, the parametric equations are of the form
x = a0 + a1 t + a2 t2 + a3 t3
y = b0 + b1 t + b2 t2 + b3 t3
To solve for the ai , we set up four linear equations:
0 = a0 + a1 0 + a2 02 + a3 03
1 1 1
2 = a0 + a1 ( ) + a2 ( )2 + a3 ( )3
4 4 4
3 3 2 3
0 = a0 + a1 ( ) + a2 ( ) + a3 ( )3
4 4 4
2 = a0 + a1 1 + a2 12 + a3 13
In matrix form, we have
1 0 0 0 a0 0
1
( 14 )2 ( 41 )3
1
a1
2
4 = .
3
1
4 ( 34 )2 ( 43 )3
a2
0
1 1 1 1 a3 2
from which
x = 18t − 48t2 + 32t3
Likewise for y, we solve the set of equations
1 0 0 0 b0 0
1 1 ( 1 )2 ( 1 )3
b 2
1
4 4 4 = .
1 3 ( 3 )2 ( 3 )3 b2 3
4 4 4
1 1 1 1 b3 4
1 1 1 12 1 13
2 = a0 (1 − )3 + 3a1 (1 − )2 + 3a2 (1 − ) + a3 .
4 4 4 4 4 4
3 3 3 32 3 33
0 = a0 (1 − )3 + 3a1 (1 − )2 + 3a2 (1 − ) + a3 .
4 4 4 4 4 4
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Lagrange Interpolation 111
P2 = (-4, 16/9)
P0= (0, 0)
Note the following about the Lni (t): Lni (tj ) = 1 whenever i = j and Lni (tj ) = 0 whenever i 6= j.
This must be so in order for the curve to interpolate point Pi at parameter value ti . You can easily
verify that the following choice for Lni (t) satisfies those conditions:
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
112 Newton Polynomials
or
Lni (t) =
n
Y (t − tj )
, j 6= i
(t
j=0 i
− tj )
(t − 14 )(t − 43 )(t − 1) 16 1 3
L30 (t) = 1 3 = − (t − )(t − )(t − 1)
(0 − 4 )(0 − 4 )(0 − 1) 3 4 4
(t − 0)(t − 43 )(t − 1) 32 3
L31 (t) = = t(t − )(t − 1)
( 14 − 0)( 14 − 43 )( 14 − 1) 3 4
(t − 0)(t − 41 )(t − 1) 32 1
L32 (t) = 3 3 1 3 = − t(t − )(t − 1)
( 4 − 0)( 4 − 4 )( 4 − 1) 3 4
(t − 0)(t − 41 )(t − 34 ) 16 1 3
L33 (t) = = t(t − )(t − )
(1 − 0)(1 − 14 )(1 − 34 ) 3 4 4
The interpolating curve is thus
x(t)
P(t) = =
y(t)
0 2 0 2
L30 (t) + L31 (t) + L32 (t) + L33 (t)
0 2 3 4
If this expression is expanded out, it is seen to be identical to the equation we obtained using the
method of undetermined coefficients.
It can be shown that the Lagrange blending functions are coordinate system independent, but
do not obey the convex-hull property.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Newton Polynomials 113
fi = yi
fi+1 − fi
fi,i+1 =
ti+1 − ti
fi+1,...,k − fi,...,k−1
fi,...,k =
tk − ti
These divided differences are easily calculated by means of a divided difference table:
t0 y0 = f0
t1 y1 = f1 f0,1
t2 y2 = f2 f1,2 f0,1,2
t3 y3 = f3 f2,3 f1,2,3 f0,1,2,3
.. .. .. .. .. ..
. . . . . .
tn yn = fn fn−1,n ··· ··· ··· f0,1,...n
Example
A polynomial parametric curve P(t) of degree three satisfies the following conditions:
0 (0, 0)
1 (3, 3) (3, 3)
3 (5, 3) (1, 0) (− 23 , −1)
4 (7, 0) (2, −3) ( 13 , −1) ( 41 , 0)
from which
2 1
P(t) = (0, 0) + (3, 3)(t − 0) + (− , −1)(t − 0)(t − 1) + ( , 0)(t − 0)(t − 1)(t − 3)
3 4
from which
25
P(2) = (
, 4).
6
The divided difference table is similar to forward differencing. However, with forward differencing, it
is only possible to evaluate a polynomial at evenly spaced parameter values, whereas with a divided
difference table, you can evaluate the polynomial at any parameter value. We can also evaluate a
polynomial directly from the divided difference table (in a manner similar to forward differencing),
but it is more expensive than forward differencing.
Example A polynomial parametric curve P(t) of degree three satisfies the following conditions:
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
114 Neville’s Scheme
Solution
Since this is a degree-three polynomial, the third column in the divided difference table is constant.
We add another row to the divided difference table, place 2 (the desired parameter value) in column
1, copy the value of the third column, then solve for c0 , then c1 , then c2 .
0 (0, 0)
1 (3, 3) (3, 3)
3 (5, 3) (1, 0) (− 23 , −1)
4 (7, 0) (2, −3) ( 13 , −1) ( 41 , 0)
2 c2 c1 c0 ( 14 , 0)
To find c0 , we set up the divided difference equation
( 13 , −1) − c0 1
= ( , 0)
1−2 4
7
from which c0 = ( 12 , −1). To find c1 , we set up the divided difference equation
(2, −3) − c1
= c0
3−2
17
from which c1 = ( 12 , −2). To find c2 , we set up the divided difference equation
(7, 0) − c2
= c1
4−2
from which c2 = ( 25
6 , 4).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Comparison 115
Then likewise compute the n − 2 points pi,i+1,i+2,i+3 (τ ) and so forth until pi,...,n (τ ) = p(τ ) is
computed. A key concept here is that pi,...k (t) is the curve that interpolates Pi . . . Pk , and
therefore pi,...k (τ ) is the point on that curve corresponding to t = τ .
Example A polynomial parametric curve P(t) of degree three satisfies the following conditions:
Find P(2).
We first compute
(t1 − 2)P0 + (2 − t0 )P1 (1 − 2)P0 + (2 − 0)P1
P01 (2) = = = (6, 6);
1−0 1−0
(t2 − 2)P1 + (2 − t1 )P2 (3 − 2)P1 + (2 − 1)P2
P12 (2) = = = (4, 3);
t2 − t1 2
(t3 − 2)P2 + (2 − t2 )P3 (4 − 2)P2 + (2 − 3)P3
P23 (2) = = = (3, 6).
t3 − t2 4−3
then
(t2 − 2)P01 (2) + (2 − t0 )P12 (2) (3 − 2)P01 (2) + (2 − 0)P12 (2) 14
P012 (2) = = = ( , 4)
t2 − t0 3−0 3
(t3 − 2)P12 (2) + (2 − t1 )P23 (2) (4 − 2)P12 (2) + (2 − 1)P23 (2) 11
P123 (2) = = = ( , 4)
t3 − t1 4−1 3
and finally
(t3 − 2)P012 (2) + (2 − t0 )P123 (2) (4 − 2)P012 (2) + (2 − 0)P123 (2) 25
P0123 (2) = = = ( , 4)
t3 − t0 4−0 6
10.5 Comparison
We have outlined four different methods for finding a polynomial of degree n that interpolates n + 1
points. The method of undetermined coefficients requires the solution of n + 1 equations in n + 1
unknowns. Lagrange interpolation allows you to write down the equation of the polynomial, but
each evaluation requires O(n2 ) operations. Newton polynomials evaluation can be performed in
O(n) but there is some preprocessing involved in the divided difference table. Evaluation using
Neville’s scheme is O(n2 ). Thus, if you need to evaluate a lot of points, Newton polynomials are
the preferred method. They are also numerically stable, assuming the points you are evaluating are
within the min and max t values of the sample points.
f (n+1) (ξ)
f (x) − p(x) = (x − x0 )(x − x1 ) · · · (x − xn ) (10.1)
(n + 1)!
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
116 Error Bounds
The value f (n+1) (ξ) is the (n+1)th derivative of f (x) evaluated at some value ξ where min(x, x0 , . . . , xn ) ≤
ξ ≤ max(x, x0 , . . . , xn ). If we can determine a bound on this derivative, then equation 10.1 can be
used to provide an error bound on our approximation.
f(x0) f(x)
P1(x) f(x1)
x
x0 x1
A particularly useful case for equation 10.1 is n = 1, or linear approximation. In this case, we
can compute the maximum distance that a polynomial deviates from a straight line. If the straight
line is
f (x0 )(x1 − x) + f (x1 )(x − x0 )
p1 (x) =
x1 − x0
then
max(min(x,x0 ,x1 )≤x≤max(x,x0 ,x1 )) (f 00 (x))
|f (x) − p1 (x)| ≤ (x − x0 )(x − x1 ).
2
Let δ = x1 −x0 and L = max(min(x,x0 ,x1 )≤x≤max(x,x0 ,x1 ) (f 00 (x)). Since the expression (x−x0 )(x−x1 )
x0 +x1 (x1 −x0 )2 δ2
has a maximum value at x = 2 of 4 = 4 ,
δ2
|f (x) − p1 (x)| ≤ L .
8
We can assure that the approximation error will be less than a specified tolerance by using m line
segments whose endpoints are evenly spaced in x, where
r
L
m≥ (x1 − x0 ).
8
A useful application of this idea is to determine how many line segments are needed for plotting
a Bézier curve so that the maximum distance between the curve and the set of line segments is less
than . Figure 10.4 shows a cubic Bézier curve approximated with various numbers of line segments.
In this case, we simply get a bound on the error in x coordinates and y coordinates independently,
and apply the Pythagorean theorem. Bounds (Lx , Ly ) on the second derivatives of Bézier curves are
easily obtained by computing the second hodograph:
Lx = n(n − 1) max |xi+2 − 2xi+1 + xi | (10.2)
0≤i≤n−2
and
Ly = n(n − 1) max |yi+2 − 2yi+1 + yi |, (10.3)
0≤i≤n−2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Error Bounds 117
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
118 Interpolating Points and Normals
f (n+1) (x)
|f (x) − p(x)| ≤ max max |(x − x0 )(x − x1 ) · · · (x − xn )| (10.5)
a≤x≤b (n + 1)! a≤x≤b
where x, x0 , . . . , xn ∈ [a, b]. If we want to decrease the approximation error, we have no con-
(n+1)
trol over maxa≤x≤b f (n+1)! (x)
. However, there is an optimal choice for the xi which will minimize
maxa≤x≤b |(x − x0 )(x − x1 ) · · · (x − xn )|.
One might make an initial guess that the best choice for the xi to minimize maxa≤x≤b |(x −
x0 )(x − x1 ) · · · (x − xn )| would be simply to space them evenly between x0 and xn . This actually
gives pretty good results. For the interval [a, b] with xi = a + (b − ai )/n, it is observed that at least
n
for 4 ≤ n ≤ 20, maxa≤x≤b |(x − x0 )(x − x1 ) · · · (x − xn )| ≈ b−a
3 .
The best choice for the xi is the Chebyshev points:
a+b b−a 2i + 1
xi = + cos π, i = 0, . . . , n − 1. (10.6)
2 2 2n + 2
n
In this case, maxa≤x≤b |(x − x0 )(x − x1 ) · · · (x − xn )| ≡ 2 b−a
4 .
Figure 10.5 shows the Chebyshev and uniform spacing for degree nine polynomials.
P(t) = a0 + a1 t + a2 t2 + a3 t3 .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Interpolating Points and Normals 119
.0000367
0.00000763
It should be obvious that we can now specify, for example, P(t1 ), P(t2 ), P0 (t3 ) and P0 (t4 ). Alter-
nately, we can specify three interpolating points and one slope, or three slopes and one interpolating
point, etc.
An important case of specifying points and tangent vectors is the Hermite blending functions.
In this case, the curve is determined by specifying P(0), P(1), P0 (0), and P0 (1) - that is, the two
end points and the two end tangent vectors. Solving this case using the method of undetermined
coefficients, we obtain the cubic Hermite curve:
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
120 Interpolating Points and Normals
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 11
Approximation
Xin Li, from the University of Science and Technology of China, contributed significantly to this
chapter.
11.1 Introduction
Approximation theory plays an important role in computer aided geometry design and computer
graphics. A common general problem in approximation theory can be stated as follows. Let G
denote a set of given data. Let A denote a set (usually infinite) of candidate mathematical objects
(such as functions, parametric surfaces, T-Splines, etc.) with which to approximate G. Let e(Ai , G)
be an error measure that indicates how well Ai ∈ A approximates G. We wish to find a “best”
approximation Ai ∈ A for which e(Ai , G) ≤ e(Aj , G)∀Aj ∈ A. Since finding a best approximation
can involve expensive optimization algorithms, we might be content to find any approximation for
which e(Ai , G) is less than a threshold error. A few simple examples will illustrate.
Example 1. Let G = {2, 3, 3, 5, 7} and let A be the set of all real numbers. If we choose the
error measure to be X
e(Ai , G) = ((Ai − G)2
G∈G
the best approximation is Ai = 4 for which e(4, G) = 16. This error measure is referred to as the
L2 error measure, and the best approximation is the mean of the values in G.
Example 2. Again, let G = {2, 3, 3, 5, 7} and let A be the set of all real numbers. Let the error
measure be
e(Ai , G) = max |Ai − G|.
G∈G
The best approximation is now Ai = 4.5, for which e(4, G) = 2.5. This error measure is referred
to as the L∞ error measure, and the best approximation is the average of the largest and smallest
values in G. Thus, different error functions can produce different best approximations.
Example 3. Let G be a Bézier curve of degree n (call it P(t)) and let A be the set of all Bézier
curves of degree n − 1, and A(t) a Bézier curve in A. Let the error measure be
121
122 L2 Error
Example 4. Let G be a B-Spline curve (call it P(t)) of degree n, knot vector k, and domain
t ∈ [t0 , t1 ]. Let A be the set of all B-Spline curves of degree n and with a knot vector k̃ which is
obtained by removing one or more knots from k. Let A(t) be a curve in A. Let the error measure
be
max ||P(t) − A(t)||, t ∈ [0, 1].
This is the “knot removal” problem.
Example 5. G is a large set of data points, measured on the surface of a physical object. A is
a set of NURBS, T-Splines, or Subdivision Surfaces. This is the “reverse engineering,” for which it
is customary to use the L2 error measure.
Example 6. In drawing a curve or surface, it is customary to approximate the curve with a
polygon, or the surface with a polyhedron. These are examples of approximating a continuous object
with a simpler continuous object. The question of how many line segment or triangles are needed
to make the curve or surface appear smooth belongs to approximation theory.
11.2 L2 Error
The L2 error measure is widely used in approximation problems because in many cases it is partic-
ularly easy to identify Ai that minimizes the L2 error measure. Approximation using the L2 error
measure is also called “least squares” approximation. In the case where G is a set of real numbers,
the best L2 approximation is simply the mean of those numbers. Specifically, let
n
X
f (x) = (x − xi )2 .
i=1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Approximating a Set of Discrete Points with a B-Spline Curve 123
Pn
minimizes the discrete L2 error where Ai ∈ A is given by B(t) = j=1 Tj Bj (t). This amounts to
identifying the B-Spline control points T1 , T2 , . . . , Tn that minimize the function
M
X n
X
Lsq(T1 , T2 , . . . , Tn ) = (Pi − Tj Bj (ti ))2 . (11.1)
i=1 j=1
∂Lsq(T1 , T2 , . . . , Tn )
= 0. (11.2)
∂Tj
We can solve for the control points Ti from the linear equation
Mf it ∗ T = B (11.3)
PM
where Mf it is a n × n matrix with element aij = k=1 Bi (sk )Bj (sk ). T = [Ti ] is the vector of
PM
control points for which we are solving and B is a vector whose elements are bi = k=1 Pk Bi (tk ).
The prudent choice of si for each sample point Pi , which determines the parametrization of the
curve, is crucial in obtaining a good fit. The choice of knot vector or knot intervals can also impact
the quality of the fit. The next two subsections elaborate on these topics.
11.3.1 Parametrization
The simplest parametrization assigns evenly spaced parameter values to the data points:
j−1
tj = . (11.4)
M −1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
124 Approximating a Set of Discrete Points with a B-Spline Curve
This uniform parametrization works well if the data points are evenly spaced, as illustrated in
Figurefig:1.
The second is arc length parametrization, which is defined as
Pj
kPi − Pi−1 k
sj = Pi=2
M
. (11.5)
i=2 kPi − Pi−1 k
The uniform parametrization only suits for regular sample points. The arc length parametrization
is much more popular. Here we will give some examples to show the result of least square fitting with
different parametrization. In the following examples, the red line is the control polygon and the blue
points are the sample points. Figure 11.2,11.1 are two examples of using different parametrization.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Fairing 125
11.4 Fairing
In order to get smooth curve or surface to fit the given samples
R points very well, we often add some
2
energy to the equation 11.3. For curve, the item often used is fss . So the problem is changed to
M
X n
X Z Xn
min (Pi − Tj Bj (si ))2 + c ( Tj Bj (s))2 ) (11.6)
i=1 j=1 j=1
Here the constant c is defined by user. But this constant is very important for the result curve and
it is very difficult to choose the constant. Similarly, the problem also equates the solution of the
following linear functions:
(Mf it + cMf air ) ∗ T = B; (11.7)
Here the algorithm for computing the fairing matrix is listed as follows:
Figure 11.4 illustrated two pictures which are least square fitting and after fairing. We can see
that after fairing, the curve becomes much better.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
126 Fairing
But as we just said, it is very difficult to choose the constant. A larger constant will leads the
curve to be shrank, to see Figure 11.5 as an examples.
We must mention here that it is very difficult to smooth a curve with bad parameters. Figure
11.6 gives the example. With a bigger constant, the curve will be shrank as the picture in Figure
11.5.
11.4.1 Interpolation
The interpolation means that we specify some points that the result curve must pass through. Sup-
pose the interpolation points are Qi , i = 1, . . . , I, and the associated parameter are ui respectively.
Then the problem turns to
M
X n
X Z X n
min (Pi − Tj Bj (si ))2 + c ( Tj Bj (s))2 )
i=1 j=1 j=1
n
X
subject to: Tj Bj (ui ) = Qi , i = 1, . . . , I.
j=1
The derivations of the function for all the Tj and λk are all zero. all the linear functions can be
written as a matrix form:
Mf it + cMf air | A
− − − − − − − + −− [T1 , . . . , Tn , λ1 , . . . , λI ]T = [B|C]T
AT | 0
Here A is a matrix with n rows and I columns which element of i − th rows and j − th columns
is
aij = Bi (uj ), 1 ≤ i ≤ n, 1 ≤ j ≤ I.
And the element of C is
Rj = Qj , 0 < i ≤ I.
Solve the linear functions, we can compute all the control points for the curve. But the result
curve is also associated with the constant. The curve is much less sensitive than that of without
interpolation. Figure 11.7 shows an example of interpolation with different constants. In the next
section, we will give the method for eliminating the constant.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Fairing 127
If ε is less than the least square error, then the set is null. The idea for fairing is that select the
fairest curve from L2ε according to a given error ε. The problem is a convex problem. But it is very
difficult to solve. So we want to reduce the condition to turn the problem to a linear condition.
Define a bound box BXi for each sample point Pi , and we restrict real point belongs to the
bound box. That is to say, we want to find the fairest curve from the space:
n
X
L = {f |f (s) = Ti Bi (s), f (ui ∈ BXi )}. (11.9)
i=1
Here we will define two kinds of bounding box, the first is very popular, which parallel to the
coordinates.
BXi = {(x, y)|sxi ≤ x ≤ lxi , syi ≤ y ≤ lyi } (11.10)
Then the problem can be divided into two or three independent problems such like that:
min X T HX
subject to: AX ≤ B (11.11)
Here
X = [x1 , x2 , . . . , xM ];
Z
H = [hij ]n×n , hij = Bi (s)Bj (s);
A = [aij ]4M ×2n , (aij , ai(j+n) ) = −(a(i+M )j , a(i+M )(j+n) ) = Bj (ui )ti ,
(a(i+2M )j , a(i+2M )(j+n) ) = −(a(i+3M )j , a(i+3M )(j+n) ) = Bj (ui )ni ;
B = [bi ]4M , bi = Pi · ti + 0.5ti · ti , bi+M = −Pi · ti + 0.5ti · ti ,
bi+2M = Pi · ni + 0.5ni · ni , bi+3M = −Pi · ni + 0.5ni · ni ,
Solve the quadratic problem, we can get the solution. We can see that it is much better than both
least square and fairing.
Here the tangent ti and normal ni for each point Pi are estimated with a very simple method.
Let P0 = P1 and PM +1 = PM , then the direction of ti is the same as Pi+1 − Pi−1 . ni is the
perpendicularity direction of ti .
11.4.3 Images
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
128 Fairing
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Fairing 129
3
5
2.5
4
2 3
1.5 2
1 1
0.5 0
0 −1
−0.5 −2
−5 −4 −3 −2 −1 0 1 2 3 4 5 −6 −4 −2 0 2 4 6
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
130 Fairing
3 3
2.5 2.5
2 2
1.5 1.5
1 1
0.5 0.5
0 0
−5 −4 −3 −2 −1 0 1 2 3 4 5 −5 −4 −3 −2 −1 0 1 2 3 4
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 12
In recent years there has been considerable interest in approximating the curves and surfaces that
arise in computer–aided design applications by other curves and surfaces that are of lower degree, of
simpler functional form, or require less data for their specification (see, for example, [Hos87], [Hos88],
[Lac88], [LM87], [Pat89], [SK91], [SWZ89], [WW88]). The motivation for this activity arises from
the practical need to communicate product data between diverse CAD/CAM systems that impose
fundamentally incompatible constraints on their canonical representation schemes, e.g., restricting
themselves to polynomial (rather than rational) forms, or limiting the polynomial degrees that they
accommodate.
While most of the approximation schemes in the references cited above attempt at minimum to
guarantee that an approximation will satisfy a prescribed tolerance, once this has been achieved none
of them proposes to carry detailed information on the approximation error forward to subsequent
applications in other systems. Such information can be of crucial importance, for example, in
tolerance analyses of the components of a mechanism. This chapter describes a form — the interval
Bézier curve — that is capable of carrying such information, and we show how a complete description
of approximation errors may be readily embodied in such forms in a straightforward and natural
manner.
131
132 Interval arithmetic and interval polynomials
where division is usually defined only for denominator intervals that do not contain 0. Occasionally,
we shall wish to treat a single real value as a degenerate interval,
a = [ a, a ] (12.4)
so that we can apply the rules (12.3) to mixed operands (e.g., a + [ b, c ] = [ a + b, a + c ]). We shall
also make use of a convenient short–hand notation for intervals, denoting them by a single symbol
enclosed in square parentheses, e.g., [ u ] = [ a, b ] and [ v ] = [ c, d ]. (However, the reader is warned
against allowing this notation to impart an undue sense of familiarity — note, for example, that
[ u ] − [ u ] 6= 0 in general!)
It can be verified from (12.3) that interval addition and multiplication are commutative and as-
sociative, but that multiplication does not, in general, distribute over addition. A notable exception
is the multiplication of a sum of intervals by a scalar value, for which
α ([ u ] + [ v ]) = α[ u ] + α[ v ] (12.5)
holds for arbitrary real values α and intervals [ u ], [ v ]. An example of the converse case — the sum
of scalar multiples of a given interval — is given in equation (12.24) below. For a more rigorous and
detailed discussion of these matters, see [Moo66], [Moo79].
Interval arithmetic offers an essentially infallible (although often pessimistic) means of monitoring
error propagation in numerical algorithms that employ floating point arithmetic. Many familiar
algorithms can be re–formulated to accept interval operands (e.g., [Han78b], [Han78a]). The use of
interval techniques in the context of geometric modeling calculations has been discussed in [MK84].
An interval polynomial is a polynomial whose coefficients are intervals. We shall denote such
polynomials in the form [ p ](t) to distinguish them from ordinary (single–valued) polynomials. In
general we express an interval polynomial of degree n in the form
n
X
[ p ](t) = [ ak , bk ] Bkn (t) , (12.6)
k=0
on [ 0, 1 ]. Using (12.3), the usual rules of polynomial arithmetic can be carried over with minor
modifications to the case of interval polynomials (see [Rok75]; polynomial arithmetic in the Bernstein
basis is described in [FR88]). Since the basis functions (12.7) are evidently all non–negative for
t ∈ [ 0, 1 ], we can also express (12.6) in the form
where
n
X n
X
pmin (t) = ak Bkn (t) and pmax (t) = bk Bkn (t) . (12.9)
k=0 k=0
A useful concept in dealing with interval polynomials defined over a finite domain as approxima-
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Interval Bézier curves 133
The last step follows from the fact that the definite integral of each of the basis functions (12.7) over
[ 0, 1 ] is just 1/(n + 1) [FR88].
The width (12.10) measures the total area enclosed between the two polynomials (12.9) that
define the upper and lower bounds on [ p ](t) over t ∈ [ 0, 1 ]. The Bernstein–Bézier formulation
(12.6) has the convenient feature that the width of an interval polynomial [ p ](t) is simply the
average of the widths bk − ak of its coefficients.
A desirable characteristic of any scheme that calls for approximation by interval polynomials is
to provide a means whereby successive approximations of uniformly decreasing width are generated.
The approximated function can thus be confined within as small an area as desired.
Such point–set operations arise, for example, in image analysis [Ser82]. However, since they are
in general quite difficult to perform algorithmically (even when [ p1 ] and [ p2 ] are restricted to
polygonal boundaries), it will be prudent for the present to restrict our attention to vector–valued
intervals that are just the tensor products of scalar intervals,
[ p1 ] + [ p2 ] = [ a1 + a2 , b1 + b2 ] × [ c1 + c2 , d1 + d2 ] , (12.13)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
134 Interval Bézier curves
where the Bernstein basis function Bkn (t) are as defined above in (12.7). The vector coefficients
Pk = (xk , yk ) in (12.14) are called the control points of the curve.
An interval Bézier curve (i.e., a Bézier curve with vector–interval control points) is written in
the form
n
X
[ P ](t) = [ Pk ] Bkn (t) , (12.15)
k=0
where we assume that the [ Pk ] are rectangular (possibly degenerate) intervals of the form (12.12).
Figure 12.1 illustrates a sample cubic interval Bézier curve.
[P2]
[P1]
[P0]
[P3]
For each t ∈ [ 0, 1 ], the value [ P ](t) of the interval Bézier curve (12.15) is a vector interval that
has the following significance: For any Bézier curve P(t) whose control points satisfy Pk ∈ [ Pk ]
for k = 0, . . . , n, we have P(t) ∈ [ P ](t). Likewise, the entire interval Bézier curve (12.15) defines
a region in the plane that contains all Bézier curves whose control points satisfy Pk ∈ [ Pk ] for
k = 0, . . . , n.
We shall not concern ourselves here with defining curves of the form (12.15) ab initio, but rather
with the use of that form in approximating more complicated curves and surfaces by polynomial
interpolation in such a manner that the interval control points [ Pk ] reflect the approximation error.
Thus, the plane region defined by an interval approximant [ P ](t) to some other curve r(t) will be
guaranteed to contain the latter.
While an initial approximant of this form may be unacceptably crude — defining an area that
is too large for practical purposes — a process of refinement by subdivision will usually remedy
this problem. A precise representation of the error incurred by approximations can be crucial in
applications such as tolerance analysis, where a nominal approximant is of little value without
information on its deviation from the exact form. The Bernstein–Bézier form offers an intuitive
framework for expressing approximants, along with their error terms, as interval–valued polynomials.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Interval Bézier curves 135
M(p0 , p1 , t) = (1 − t) p0 + t p1 (12.16)
of two points p0 and p1 (we consider for now the case where p0 and p1 are simply scalar values).
This map can be visualized as shown in Figure 12.2, where the values of p0 and p1 are taken as the
vertical coordinates, and the values of t as horizontal coordinates. At t = 0, y = p0 while at t = 1,
y = p1 . The affine map is then represented graphically by drawing a straight line through p0 and
p1 . This line can be regarded as the affine map function for the two points: at any value of t, the
affine map is simply the vertical coordinate of the line.
p1
(1-t) p0 + t p1
p0
0 t 1
[ M ]( [ a, b ], [ c, d ], t ) = (1 − t) [ a, b ] + t [ c, d ]
= { (1 − t) u + t v | u ∈ [ a, b ] and v ∈ [ c, d ] } . (12.17)
The affine map (12.17) can be visualized as shown in Figure 12.3 — for a given value of t,
+td
(1-t)a
d
d
(1-t)b + t
(1-t)b + t c b c (1-t)b + t c
tc
(1-t)a +
a
+td
(1-t)a 0 t 1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
136 Interval Bézier curves
[ M ]( [ a, b ], [ c, d ], t ) is generated by drawing a vertical line at that t value and identifying all points
on that line which are collinear with any point in [ a, b ] at t = 0 and any point in [ c, d ] at t = 1.
Qualitatively, we see that the width of the affine map (12.17) lies between the widths of [ a, b ] and
[ c, d ] when t ∈ [ 0, 1 ], whereas the width of the affine map grows linearly — without bound — for t
outside the unit interval.
The affine map of two vector-valued intervals [P0 ] and [P1 ] as defined in equation 12.12 is simply
as shown in figure 12.4. Observe that the midpoint, width, and height of the affine map rectangle
[P1]
(1-t)[P0 ]+t[P1 ]
[P0 ]
are simply affine maps of the midpoints, widths, and heights of [P0 ] and [P1 ].
For a Bézier curve of the form (12.14), we may regard the de Casteljau algorithm as a repeated
(0)
application of (12.16) to the control points {Pk }. With Pk = Pk for k = 0, . . . , n, we set
(r)
and r = 0, . . . , n − 1. This generates a triangular array of the quantities {Pk } — the final entry
(n)
Pn in this array corresponds to the point P(t) on the curve (12.14), while the entries
(0) (1)
P0 , P1 , . . . , P(n)
n and Pn(n) , P(n−1)
n , . . . , P(0)
n (12.20)
on the left– and right–hand sides of the array are the control points for the subsegments of P(t) over
the parameter intervals [ 0, t ] and [ t, 1 ], respectively. To apply (12.19) to interval Bézier curves, we
(r)
simply replace the quantities Pk by their interval counterparts, and invoke the appropriate rules
of interval arithmetic, as illustrated in Figure 12.5. We discuss the de Casteljau algorithm further
in the next section.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Interval Bézier curves 137
[P1] [P2]
[P0]
[P3]
[ Pk ] = ([ ak , bk ], [ ck , dk ])
1 1
= (ak + bk , ck + dk ) + (bk − ak , dk − ck ) [ −1, +1 ]
2 2
= [ Pk ] + ek [ i ] (12.21)
where [ i ] denotes the interval [ −1, +1 ]. In (12.21), the point [ Pk ] is the center of the vector
interval [ Pk ], while the vector ek is the error of [ Pk ]. Note that the x and y components of ek are
necessarily non–negative.
Using centered form, the affine map of two interval points may be written as
(1 − t) [ P0 ] + t [ P1 ] = (1 − t) {[ P0 ] + e0 [ i ]} + t {[ P1 ] + e1 [ i ]}
= {(1 − t) [ P0 ] + t [ P1 ]} + {(1 − t) e0 + t e1 }[ i ] , (12.22)
where we assume that 0 ≤ t ≤ 1. Thus, the affine map of two interval points can be computed by
independently taking the affine maps of their centers and their errors.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
138 Interval Bézier curves
In bringing the interval [ i ] outside the summation sign above we rely on the fact that, for each
k = 0, . . . , n, the x and y components of ek are non–negative and Bkn (t) ≥ 0 for t ∈ [ 0, 1 ].
Thus, the interval Bézier curve [ P ](t) over 0 ≤ t ≤ 1 can be split into two independent “com-
ponents” — a center curve [ P ](t), and an error curve e(t). Note that the control points ek of e(t)
all lie within the first quadrant, and consequently the error curve is itself contained within that
quadrant for t ∈ [ 0, 1 ].
Equation (12.22) suggests that for t outside the unit interval, the error curve should grow mono-
tonically. Writing equation (12.17) in centered form with [ a, b ] = p0 + e0 [ i ] and [ c, d ] = p1 + e1 [ i ],
and noting that
α[ i ] + β[ i ] = (|α| + |β|) [ i ] (12.24)
for arbitrary real numbers α and β, we see that the expressions
[ M ](p0 + e0 [ i ], p1 + e1 [ i ], t)
p0 (1 − t) + p1 t + {e0 (1 − t) − e1 t} [ i ] for t < 0 ,
= p0 (1 − t) + p1 t + {e0 (1 − t) + e1 t} [ i ] for 0 ≤ t ≤ 1 , (12.25)
p0 (1 − t) + p1 t + {e0 (t − 1) + e1 t} [ i ] for t > 1 ,
describe the behavior of the affine map of two scalar intervals for all real t (see Figure 12.4).
The de Casteljau algorithm (12.19) is essentially a repeated application of the affine map (12.25).
Figure 12.5 illustrates for the case t = 21 . By studying the behavior of the de Casteljau algorithm
applied to an interval Bézier curves outside the unit interval, equation (12.25) leads to the following
expressions: n
X
[ Pk ] Bkn (t) + e(t)[ i ] for 0 ≤ t ≤ 1 ,
[ P ](t) = k=0 (12.27)
Xn
n
[ P k ] B k (t) + ẽ(t)[ i ] for t < 0 or t > 1 ,
k=0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Interval Bézier curves 139
defines an error curve that is appropriate to the domains t < 0 and t > 1. (Alternately, we may
substitute |Bkn (t)| = (−1)k Bkn (t) when t < 0, and |Bkn (t)| = (−1)n+k Bkn (t) when t > 1, into
n
X
[ P ](t) = {[ Pk ] + ek [ i ]} Bkn (t) (12.29)
k=0
n
X n
X
= [ Pk ] Bkn (t) + [ i ] ek |Bkn (t)| ,
k=0 k=0
n−r
n! X
P(r) (t) = ∆r Pk Bkn−r (t) , (12.30)
(n − r)!
k=0
where the quantities {∆r Pk } are the r–th forward differences of the control points, given by
r
X r
∆ r Pk = (−1)j Pk+r−j for k = 0, . . . , n − r . (12.31)
j=0
j
Thus, it is noteworthy that ballooning does not occur with the de Casteljau algorithm when applied
within the unit parameter interval. Even after repeated applications of the de Casteljau algorithm
to an interval Bézier curve, a point [ P ](t) evaluated on a subdivided region of the curve has the
same size as the given point evaluated on the original curve, as long as the subdivision always occurs
within the [ 0, 1 ] parameter domain. However, equation (12.27) shows that serious interval inflation
will occur when subdividing outside the unit interval.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
140 Interval Bézier curves
are four possible Bézier curves involved in the envelope for a curve over the unit parameter interval.
Those four curves are defined by the four respective rectangle corners of the interval control points.
If the center curve [ P ](t) is progressing NE or SW, the upper envelope bound is defined by
control points lying in the top left corner of their respective intervals, and the lower envelope bound
is defined by control points lying in the bottom right corner of their respective intervals. Likewise, a
curve progressing NW or SE is bounded from above by a curve whose control points lie in top right
corners, and from beneath by a curve whose control points lie in bottom left corners. In the case of
a horizontal or vertical tangency, straight line segments are introduced into the envelope, equal in
width to twice the interval error at the point of tangency.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Approximation by interval polynomials 141
Thus, we can represent the boundary of the region covered by an interval Bézier curve as a
piecewise–Bézier curve of the same degree. Any linear segments that arise in this boundary due to
points of horizontal or vertical tangency can be degree–elevated if desired, making the representation
of the envelope compatible with standard spline formats.
be an ordered sequence of n + 1 distinct points on that interval. The Lagrange interpolant to the
sampled values fk = f (tk ), k = 0, 1, . . . , n of f (t) at these points is the unique polynomial of degree
n given by
X n
Fn (t) = fk Lk (t) , (12.36)
k=0
where the n + 1 linearly independent polynomials
n
Y t − tj
Lk (t) = for k = 0, . . . , n (12.37)
t − tj
j=0 k
j6=k
constitute the Lagrange basis for the sequence of nodes t0 , t1 , . . . , tn . Since the basis polynomials
(12.37) satisfy the conditions (
1 if j=k,
Lk (tj ) = δjk = (12.38)
0 otherwise,
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
142 Approximation by interval polynomials
for each j = 0, . . . , n and k = 0, . . . , n it is clear that the polynomial Fn (t) reproduces the values of
the function f (t) at each of the nodes: Fn (tk ) = fk for k = 0, . . . , n.
and if we have information on the behavior of the derivative f (n+1) (t) over the interval [ a, b ], we
may express (12.39) by the Cauchy remainder formula [Dav63]:
n
f (n+1) (ξ) Y
En (t) = (t − tk ) for some ξ ∈ (a, b) . (12.40)
(n + 1)!
k=0
Although, for each t, the value ξ at which the right hand side of (12.40) gives the error En (t) of the
Lagrange interpolant is not easily determined, if we know upper and lower bounds on f (n+1) (t) over
[ a, b ],
(n+1)
fmin ≤ f (n+1) (t) ≤ fmax
(n+1)
for all t ∈ (a, b) (12.41)
then we may write
(n+1) (n+1) n
[ fmin , fmax ] Y
f (t) ∈ Fn (t) + (t − tk ) , (12.42)
(n + 1)!
k=0
where the right hand side is regarded as an interval polynomial [ Fn+1 ](t) of degree n + 1.
In the particular form (12.42), only the remainder term has a non–degenerate interval coefficient,
but if we choose to represent this interval polynomial in another basis — for example, as
n+1
n + 1 (b − t)n+1−k (t − a)k
X
[ Fn+1 ](t) = [ ak , bk ] (12.43)
k (b − a)n+1
k=0
in the Bernstein basis of degree n + 1 on [ a, b ] — we would find that in general each coefficient
[ ak , bk ] is a proper interval of finite width. The formulae giving the interval coefficients of (12.43)
in terms of the nodes (12.35), the function values f0 , f1 , . . . , fn at those nodes, and the derivative
bounds (12.41) for f (t) on [ a, b ] are cumbersome to quote in full generality; we shall give explicit
formulae below only for the simpler cases of practical interest.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Approximation by interval polynomials 143
From the above, we can write down an expression analogous to (12.42), namely
(n+1) (n+1) r
[ fmin , fmax ] Y
f (t) ∈ Fn (t) + (t − tk )mk +1 . (12.48)
(n + 1)!
k=0
The interval–valued error term on the right has the same coefficient as in (12.43), but its dependence
on t is different.
An important instance of the general Hermite problem (12.46) is the symmetric interpolation of
values and derivatives to order (n − 1)/2 of a function f (t) at the end–points of the unit interval
[ 0, 1 ] by a polynomial Fn (t) of odd degree n,
Fn(i) (0) = f (i) (0) and Fn(i) (1) = f (i) (1) for i = 0, . . . , (n − 1)/2 . (12.49)
If we define the Hermite basis {Hkn (t)} of odd degree n on [ 0, 1 ] by demanding that the boundary
conditions
d j Hkn d j Hn−k
n
= = δjk (12.50)
dt j dt j
t=0
t=1
be satisfied for j, k = 0, . . . , (n − 1)/2 (where δjk is the Kronecker symbol given by (12.38) above),
we can write down the solution to (12.49) in the form
(n−1)/2
X
Fn (t) = f (k) (0)Hkn (t) + f (k) (1)Hn−k
n
(t) . (12.51)
k=0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
144 Approximation by interval polynomials
[ f 00 ] = [ fmin
00 00
, fmax ], (12.56)
[ f 00 ]
f (t) ∈ F1 (t) − t(1 − t) for all t ∈ [ 0, 1 ] . (12.57)
2
In order to formulate the above as a quadratic interval polynomial [ F2 (t) ], we degree–elevate (12.54)
by multiplying the right hand side by 1 = (1 − t) + t to obtain
2
X
f (t) ∈ [ F2 ](t) = [ F2,k ] Bk2 (t) (12.58)
k=0
where
2f0 + 2f1 − [ f 00 ]
[ F2,0 ] = f0 , [ F2,1 ] = , [ F2,2 ] = f1 . (12.59)
4
Thus, in the case of a linear end–point interpolant, we see that the resulting quadratic interval
polynomial bounds f (t) on [ 0, 1 ] from below and above by the parabolas
00
2f0 + 2f1 − fmax
F2,min (t) = f0 B02 (t) + B12 (t) + f1 B22 (t) ,
4
00
2f0 + 2f1 − fmin
F2,max (t) = f0 B02 (t) + B12 (t) + f1 B22 (t) . (12.60)
4
For the case of cubic Hermite interpolation to the function values f0 , f1 and derivatives f00 , f10 at
the end–points of [ 0, 1 ], the Bernstein–Bézier form of the interpolant is
where the coefficients of the quartic interval polynomial on the right are given by
1
[ F4,0 ] = f0 , [ F4,1 ] = f0 + f00 ,
4
1 1 1
[ F4,2 ] = (f0 + f1 ) + (f00 − f10 ) + [ f (4) ] ,
2 6 144
1
[ F4,3 ] = f1 − f10 , [ F4,4 ] = f1 . (12.63)
4
It should be noted that in all cases of symmetric Hermite interpolation of function values
and derivatives to order (n − 1)/2 at the end points of an interval, only the middle coefficient
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Approximation by interval polynomials 145
[ Fn+1,(n+1)/2 ] of the interpolating interval polynomial [ Fn+1 ](t) has non–zero width, since the
n+1
residual (12.52) contributes only to the term involving the basis function B(n+1)/2 (t). The width of
this middle coefficient is just
(n+1) (n+1)
fmax − fmin
2 . (12.64)
(n + 1) n · · · 21 (n + 3)
Note also that for end–point Hermite interpolation, the width of the interval polynomial [ Fn+1 ](t)
always degenerates to zero at t = 0 and t = 1.
Example 1. With f (t) = et we have f (0) = f 0 (0) = 1, f (1) = f 0 (1) = e, and f (4) (t) ∈ [ 1, e ] for
t ∈ [ 0, 1 ]. The interval control points (12.63) of the Hermite interpolant reflecting these values are
then:
5 1
[ F4,0 ] = 1 , [ F4,1 ] = , [ F4,2 ] = [ 97 + 48e, 96 + 49e ] , (12.65)
4 144
3
[ F4,3 ] = e , [ F4,4 ] = e .
4
We can gain a better idea of the width of the middle control point from the approximate form
[ F4,2 ] ≈ [ 1.5797, 1.5916 ]. From (12.10) we now see that the overall width of the approximant
[ F4 ](t) over [ 0, 1 ] is (e − 1)/720 ≈ 0.0024. Thus, the upper and lower bounds on f (t) = et deviate
by no more than 1 per cent over the entire interval [ 0, 1 ], and on average much less than this.
Example 2. With f (t) = sin(πt/2) we have f (0) = 0, f 0 (0) = π/2, f (1) = 1, f 0 (1) = 0, and
f (4) (t) ∈ [ 0, π 4 /16 ] for t ∈ [ 0, 1 ]. In this case, we have
π 1
[ F4,0 ] = 0 , [ F4,1 ] = , [ F4,2 ] = [ 192(6 + π), 192(6 + π) + π 4 ] , (12.66)
8 2304
[ F4,3 ] = 1 , [ F4,4 ] = 1 .
and the interval–valued coefficient is approximately [ F4,2 ] ≈ [ 0.7618, 0.8041 ]. The overall width of
[ F4 ](t) over [ 0, 1 ] is now π 4 /11520 ≈ 0.0085, somewhat larger than in the preceding example.
to obtain the derivative bounds required by the approximation procedure. We recall that the r–th
derivative of f (t) can be written as
n−r
n! X
f (r) (t) = ∆r pk Bkn−r (t) , (12.68)
(n − r)!
k=0
n! n!
min ∆r pk ≤ f (r) (t) ≤ max ∆r pk for t ∈ [ 0, 1 ] . (12.69)
(n − r)! k (n − r)! k
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
146 Approximation by interval Bézier curves
where the Lagrange basis is as defined in (12.37) above. But the remainder formula in the vector case
is not obtained by merely substituting P(n+1) (ξ) in place of f (n+1) (ξ) in equation (12.40). Rather,
we must write the errors for the x and y components of Pn (t) = {Xn (t), Yn (t)} separately
En,x (t) = x(t) − Xn (t) and En,y (t) = y(t) − Yn (t) , (12.71)
for some ξ1 , ξ2 ∈ (a, b), where ξ1 6= ξ2 in general. However, defining a vector–valued interval for
P(n+1) (t) over t ∈ [ a, b ] in the form
(n+1) (n+1)
[ P(n+1) ] = [ xmin , x(n+1) (n+1)
max ] × [ ymin , ymax ] (12.73)
P(t) = P(0)H03 (t) + P0 (0)H13 (t) + P0 (1)H23 (t) + P(1)H33 (t) . (12.75)
If the data points P0 , P1 , . . . , Pn were actually sampled from another parametric curve r(t) and
we knew vector–valued bounds on the fourth derivative r(4) (t) between consecutive points, we could
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Approximation by interval Bézier curves 147
replace the cubic Hermite arcs (12.75) by quartic interval Bézier arcs of the form
4
X
[ P ](t) = [ P4,k ] Bkn (t) (12.76)
k=0
P4,1
P4,0
[P4,2]
P4,3
P X
Figure 12.7: Approximate arc length parametrization of circle.
is useful because it approximates an arc length parametrization of the circle within two digits of
accuracy.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
148 Approximation by interval Bézier curves
In practice, one might simply choose the middle control point to be at the interval center [ P4,2 ] =
(0.78295, 0.78295), and use the control point interval as an assurance that the largest possible error,
which occurs at t = 0.5, is
4
4 0.8041 − 0.7618 1
= 0.0079. (12.79)
2 2 2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 13
Most scientific computing is performed in floating point arithmetic in the binary number system.
For our discussion, consider the floating point number represented using 32 bits of memory, with
d = 23 bits of fraction and 8 bits of exponent
This string of 32 bits serve as sort of a “code” for representing numbers using the base 2 number
system. The decoding formula is to
" d #(−1)es P j=06 ej 2j
X
b = (−1)s f e = (−1)s fi 2−i . (13.2)
i=1
For example,
1 1 1 7
0|100000001|11100000000000000000000 = .1112 × 2−1 = .01112 = + + =
4 8 16 16
1
1|000000100|10011000000000000000000 = −.100112 × 24 = −1001.12 = −9
2
One limitation of this floating point number system is that not every number can be represented
exactly. For example, the number 13 is a repeating decimal in the binary number system:
1 ¯2
= 0.010101
3
and thus there is no floating point number which exactly equals 31 . It lies between the two adjacent
floating point numbers
1
0|100000001|10101010101010101010101 < < 0|100000001|10101010101010101010110
3
149
150
Therefore, a floating point number is best thought of as an interval which contains all numbers which
are closer to it than to any other floating point number. If d is the number of bits in the fraction of
a given floating point number b, then that interval is
This chapter discusses the floating point error incurred in evaluating a Bézier curve. Figure 13.1
shows a Bézier curve which is tangent to the horizontal axis at t = 0.25. Due to numerical innacu-
racies in floating point arithmetic, it is not surprising that when the curve is evaluated at t = .25
(using either the de Casteljau algorithm or Horner’s method) the answer is not exactly zero. It
is interesting to note what happens when we evaluate the curve at several hundred values close to
t = 0.25. Rather than a producing a smooth graph, the evaluations fluctuate chaotically within a
band, as shown in the blowup in figure 13.1.
x=0.25
.0001
.0000001
c2=9
c0=1
c1=-3
x=0.25
1
27
c3=-27
So, how does one determine the effects of floating point error on calculations involving Bézier
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
151
curves?
Two sources of error can be considered somewhat independently. The first source of error is in
the initial floating point representation of the control points. First
Our previous discussions on interval Bézier curves should be modified slightly if one wishes to
accurately bound the uncertainty introduced when using finite–precision arithmetic. Let us first
revisit the problem of computing the affine map of two vector intervals shown in Figure 12.4. When
finite precision arithmetic is involved, some uncertainty is introduced. In order to robustly represent
that uncertainty, the resulting interval should be widened an appropriate amount (t)[i] as shown in
Figure 13.2. Here, the affine map for t = 12 is shown with the exact arithmetic in solid and floating
point error bounds in dashed line.
[P1]
(1-t)[P0 ]+t[P1 ]
[P0 ]
Given a floating point mantissa of d binary digits, the machine unit for roundoff is
η = 2−d . (13.4)
If x ∗ y, where ∗ ∈ {+, −, ×, ÷}, denotes an exact computation, and fl(x ∗ y) denotes the floating
point, imprecise computation, then
Applying this to the affine map equation 12.26 yields (see equation 26 in [FR87])
where
{|p0 |(1 − t) − |p1 |t + |p0 (1 − t) + p1 t|} η [ i ] for t < 0 ,
(t) = {|p0 |(1 − t) + |p1 |t + |p0 (1 − t) + p1 t|} η [ i ] for 0 ≤ t ≤ 1 , (13.7)
{|p0 |(t − 1) + |p1 |t + |p0 (1 − t) + p1 t|} η [ i ] for t > 1 ,
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
152
In words, to represent the effects of floating point roundoff in computing an affine map, the
rectangle obtained by computing the affine map in exact arithmetic must be fattened an absolute
amount (t).
Additional discussion on the error propagation in operations on Bernstein–form polynomials can
be found in [FR87].
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 14
Free-form deformation (FFD) is a technique for manipulating any shape in a free-form manner.
Pierre Bézier used this idea to manipulate large numbers of control points for Béziersurface patches [B7́4,
B7́8], and the power of FFD as a modeling tool was more fully explored in [SP86b]. This chapter
discusses the 2D case of FFD.
2D FFD is a map from R2 → R2 ; that is, it defines a new position for every point in a given rect-
angular region. In Figure 14.1, the FFD is specified using the nine control points. The undeformed
153
154
scene appears at the left, and the right shows what happens the the grid and circle after the control
points are moved. The grid helps to visualize how FFD works. FFD is a powerful modeling tool
because anything drawn inside of the initial, undeformed rectangle will experience the distortion,
such as the text in Figure 14.2.
Denote by (Xmin , Ymin ) and (Xmax , Ymax ) the corners of a deformation region, and by m and
n the degrees of the FFD function (there are m + 1 vertical columns and n + 1 horizontal rows of
control points).
FFD is a two-step process:
1. Compute the (s, t) coordinates for each point to be deformed. The s and t coordinates of a
point in the deformation region range between 0 and 1 (see Figure 14.3). For a point in the
(Xmax ,Ymax)
P = (x,y)
s=.6
t =.7
(Xmin ,Ymin)
2. Compute the homogeneous coordinates X(s, t) = (X, Y, W ) of the deformed point using the
rational bivariate tensor product Bernstein polynomial equation
n X
X m
X(s, t) = Bim (s)Bjn (t)Pij (14.2)
j=0 i=0
where Bin (t) and Bjm (s) are Bernstein polynomials and Pij = wij (xij , yij , 1) are the homoge-
neous coordinates of the displaced control point i, j. Note that weights can be assigned to the
FFD control points.
If all weights wij = 1 and if the control points form a rectangular lattice
i j
Pi,j = Xmin + (Xmax − Xmin ), Ymin + (Ymax − Ymin ) (14.3)
m n
as shown in Figure 14.4, FFD is the identity transformation: all points end up where they started
from.
Points outside of the rectangle are not moved. If a shape is only partially inside the FFD region,
one can control the degree of continuity between the deformed and undeformed portions of the shape
by “freezing” rows of control points, as shown in Figure 14.5.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
155
Initial C0
C1 C2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
156
Each vertical line that undergoes FFD maps to a Bézier curve of degree n, and each horizontal line
maps to a Bézier curve of degree m. Thus, the “vertical” curves in Figure 14.6.b are degree-two
Bézier curves and the “horizontal” curves are degree three. In particular, we have highlighted the
s=.6
(a) Undeformed Grid with un-displaced control points. (b) Deformed Grid.
line s = .6 in Figure 14.6.a and its deformation is the degree-two Bézier curve shown in Figure 14.6.b.
The control points for this Bézier curves are determined as follows.
Referring to Figure 14.7, consider each horizontal row of control points in the FFD control grid
to be a control polygon for a cubic Bézier curve. Call these curves H0 (s), H1 (s), and H2 (s) where
the control points for Hi (s) are P0,i , P1,i , P2,i , P3,i . Then, the three control points for the
H2(.6)
H2(s)
H1(s) H1(.6)
H0(.6)
H0(s)
degree-two Bézier curve in Figure 14.6.b are H0 (.6), H1 (.6), and H2 (.6).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
157
t=.3
(a) Undeformed Grid with horizontal line at t = .3. (b) Deformed Grid.
The horizontal line t = .3 is highlighted in Figure 14.8.a and its deformation is the degree-three
Bézier curve shown in Figure 14.8.b. The control points for this Bézier curves are determined as
follows.
Referring to Figure 14.9, consider each vertical column of control points in the FFD control grid
to be a control polygon for a quadratic Bézier curve. Call these curves V0 (s), V1 (s), V2 (s), and
V3 (s) where the control points for Vi (s) are Pi,0 , Pi,1 , Pi,2 . Then, the four control points for
V1(t) V2(t)
V3(t)
V0(t) V2(.3)
V1(.3)
V3(.3)
V0(.3)
the degree-three Bézier curve in Figure 14.9.b are V0 (.3), V1 (.3), V2 (.3), and V3 (.3).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
158
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 15
Tensor-Product Surfaces
The product of a column vector and a row vector is an example of the mathematical operation of
tensor-product:
a0 a0 b0 a0 b1 a0 b2 a0 b3
a1 ⊗ b0 b1 b2 b3 = a1 b0 a1 b1 a1 b2 a1 b3 (15.1)
a2 a2 b0 a2 b1 a2 b2 a2 b3
A tensor-product surface P(s, t) is one whose blending functions are products of pairs of uni-
variate blending functions:
Pm Pn m n
i=0 j=0 wij Pij Bi (s)Bj (t)
P(s, t) = Pm Pn m n (15.2)
i=0 j=0 wij Bi (s)Bj (t)
where the Pij are control points, wij are weights, and Bim (s) and Bjn (t) are univariate blending
functions. The control points in a tensor-product surface are organized topologically into a rectan-
gular array, and the blending functions corresponding to the control points are likewise organized in
an array similar to the one in (15.1).
Tensor-product surfaces can be constructed from any two types of univariate blending functions,
and there is no requirement that the two sets of blending functions are of the same type or degree.
If the univariate blending functions are Bernstein polynomials, the surface is a Bézier surface patch
(see Section 15.1). If the blending functions are B-Splines, the surface is a NURBS surface (see
Section 15.6).
159
160 Tensor-Product Bézier Surface Patches
Each row and column of control points can be interpreted as defining a curve. We will refer
to the curve defined by control points Pij , i = 0, 1, . . . m as the j th s-control curve and the curve
defined by control points Pij , j = 0, 1, . . . n as the ith t-control curve. Thus, there are n+1 s-control
curves, and m + 1 t-control curves. (The term “control curve” is not in standard use; it is a helpful
concept, but is not used outside of these notes.)
If we fix one of the two parameters of the surface (for example, let s = c) then (15.2) reduces to
n
"m # n
X X X
P(c, t) = Pij Bi (c) Bjn (t) =
m
Qj (c)Bjn (t) (15.5)
j=0 i=0 j=0
Pm
where Qj (c) = i=0 Pij Bim (c). P(c, t) is called an s-iso-parameter curve. Iso means constant, and
an iso-parameter curve is a curve on a surface defined by holding one of the parameters constant.
P32
P22 Q2(c) Q1(c)
P31
P12 P21 Q2(c)
P11 Q1(c)
c=1
P02 P30
.6 .8
P01 .4
.2
c=0
t P20
s Q0(c)
P00 P10 Q0(c)
(a) The surface and its control grid. (b) s-Control Curves. (c) Some s-iso-parameter curves
P(c, t).
A surface can be thought of as a family of iso-parameter curves, and the construction of those
iso-parameter curves can be easily described in terms of control curves. Figure 15.1.b shows the
s-control curves for the surface in Figure 15.1.a. Imagine that these control curves are wires, and
imagine that a bead is free to slide along each wire. These beads serve as control points for the family
of s-iso-parameter curves. That is, for a fixed value c, if we position each bead j at Qj (c), they
define the Bézier control point positions for s-iso-parameter curve P(c, t). Figure 15.1.c shows six
such iso-parameter curves. Of course, P(s, t) can likewise be viewed as a family of t-iso-parameter
curves defined by t-control curves, as illustrated in Figure 15.2.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
The de Casteljau Algorithm for Bézier Surface Patches 161
(a) t-Control curves. (b) Some t-iso-parameter curves P(s, c) for the sur-
face in Figure 15.1.a.
In general, the only control points that lie on a Bézier surface patch are the corners:
To evaluate the point P(σ, τ ), we could first evaluate the t-control curves at t = τ , and then
evaluate the t-iso-parameter curve at s = σ. Alternatively, we could first evaluate the s-control
curves at s = σ, and then evaluate the s-iso-parameter curve at t = τ .
Four special iso-parameter curves are the boundary curves P(0, t), P(1, t), P(s, 0), and P(s, 1).
These boundary curves are Bézier curves defined by the corresponding boundary rows or columns of
control points, and hence are control curves. For example, P(0, t) is the degree-three Bézier curve
whose control points are P00 , P10 , P20 , and P30 . Likewise, P(s, 1) is the degree-two Bézier curve
whose control points are P30 , P31 , and P32 .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
162 Tangents and Normals
t t t
s s s
(a) Subdivision in the s direction. (b) Subdivision in the t direction. (c) P[0, 1 ]×[0, 1 ] , obtained by sub-
2 2
1
dividing at s = 2
and then at
t = 21 .
Figure 15.3: Applying the de Casteljau algorithm to the surface in Figure 15.1.a.
The idea of control curves also leads to a straightforward explanation of how to degree elevate a
Bézier surface patch: simply degree elevate all of the s and/or t control curves.
P32
P22
P31
P12 P21
P11
P02 P30
P01
1
P
2 t P20
1
P
3 s
P00 P10
Figure 15.4: Partial derivative vectors for P[0,1]×[0,1] (s, t)(assuming weights are unity).
For a rational Bézier surface patch P[s0 ,s1 ]×[t0 ,t1 ] (s, t), the partial derivatives at corner P(0, 0)
are
m w10 n w01
Ps (s0 , t0 ) = (P10 − P00 ), Pt (s0 , t0 ) = (P01 − P00 )
s1 − s0 w00 t1 − t0 w00
These partial derivatives are illustrated in Figure 15.4. The second partial derivatives are given by
w20 10 nw10 −w00
m(m − 1) w (P20 − P00 ) − 2m w
w00 w00 (P10 − P00 )
Pss (s0 , t0 ) = 00
(s1 − s0 )2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Tessellation of Bézier Curves and Surfaces 163
A vector that is perpendicular to the surface at P(0, 0) can be obtained by taking the cross
product Ps (0, 0) × Pt (0, 0). To find the normal vector at any other point on the surface, you can
first perform de Casteljau subdivisions to move the desired point to a corner.
If L(t) is a straight line segment connecting r(α) and r(β) where 0 ≤ α < β ≤ 1, then the deviation
of L(t) from r(t) within domain [α, β] is bounded by (see Wang 1984, Filip et al 1986)
1
max kr(t) − L(t)k ≤ max kr00 (t)k(β − α)2 .
t∈[α,β] 8 t∈[α,β]
This provides a way to compute the parameter interval (or step size) δ given a tolerance :
v
u 8
, if kr00 (t)k =
6 0
u
max kr00 (t)k
t
δ≤ t∈[α,β]
1, otherwise
The sampling number nt is the reciprocal of the parameter interval, i.e., nt = d1/δe. That is, if the
curve is evenly sampled at nt + 1 parameter values, the final polyline will not deviate from the curve
greater than . In practice, the norm of the second derivative of r(t) can be bounded by the Bezier
control points:
max kr00 (t)k ≤ n(n − 1) max kPi+2 − 2Pi+1 + Pi k.
t∈[α,β] 0≤i≤n−2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
164 Tessellation of Bézier Curves and Surfaces
1
max kr(s, t) − L(s, t)k ≤ (M1 (β − α)2 + 2M2 (β − α)(η − ζ) + M3 (η − ζ)2 )
(s,t)∈[α,β]×[ζ,η] 8
where
00
M1 = max krss (s, t)k
(s,t)∈[α,β]×[ζ,η]
00
M2 = max krst (s, t)k
(s,t)∈[α,β]×[ζ,η]
00
M3 = max krtt (s, t)k.
(s,t)∈[α,β]×[ζ,η]
Given tolerance , we would like to determine the parameter intervals δs and δt for s− and t−directions
such that
M1 δs2 + 2M2 δs δt + M3 δt2 ≤ 8.
Case 1. If M1 p
= 0, the surface is a ruled surface (linear in s−direction). Then we choose δs = 1
M22 + 8M3 − M2
and δt = .
M3
Case 2. If M3 p
= 0, the surface is also a ruled surface (linear in t−direction). Then we choose δt = 1
M22 + 8M1 − M2
and δs = .
M1
Case 3. In general, the above inequality contains two unknowns δs and δt .rWe need to impose an
8
additional constraint to solve for them. Suppose δs = kδt . Then δt = 2
.
p M1 k + 2M2 k + M3
The default value for k is k = M3 /M1 .
The above choice for the value of k is to minimize the number of resulting triangles. The reasoning
is as follows. The sampling numbers ns and nt are the reciprocal of the parameter intervals δs and
δt , i.e., ns = d1/δs e and nt = d1/δt e. Thus the number of the triangles is 2ns nt . So we have to
choose k to maximize δs δt . Note that
8k
δs δt = .
M1 k 2 + 2M2 k + M3
p
This requires us to minimize M1 k + M3 /k, which gives a unique solution k = M3 /M1 . Now the
surface is sampled evenly at (ns + 1)(nt + 1) parameter values and the triangulation can be formed
by properly connecting the sampling points. In this way, it is guaranteed that the final triangle
mesh approximates the surface within the tolerance .
For a degree m × n Bezier patch
m X
X n
r(s, t) = Pij Bim (s)Bjn (t), s, t ∈ [0, 1]
i=0 j=0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Tessellation of Bézier Curves and Surfaces 165
Remark 1. When tessellating a few connecting patches, to avoid cracks, it is a good idea to compute
sampling number for all four boundary curves independently of the sampling numbers for the patch
interior (see Rockwood et al. 1989).
Remark 2. The above approach can also be applied to tessellating rational curves or surfaces. But
the estimation of the second derivative bounds is very difficult. A simple and efficient way has been
developed (see Zheng and Sederberg 2000).
Example
How many rows and columns of triangles are needed to tessellate the patch in Figure 15.5 using the
fewest number of triangles such that the approximation error ≤ .001?
Solution Using (15.6), compute bounds on second partial derivatives. In this example, the (x, y)
coordinates lie in a rectangular lattice, which means that the the (x, y) components of all second
partial derivatives are zero. The control points of the second hodographs for Pss , Pst and Ptt have
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
166 C n Surface Patches
z-coordinates as follows:
−48 24
−24 −24 0 −36 36
−24 −12 −36 −12
Pss :
−36 −24
Pst : −18 0 0 Ptt =
12 −12 −12 −12
18 0 0
−24 −24
and δs = kδt = 0.00668268. The number of rows and columns of triangles is then
1 1
ns = d e = 150; nt = d e = 130.
δs δt
It should be noted that this equation for computing the number of triangles is conservative
because the bound on the second derivative may not be tight, and because the second derivatives
can vary dramatically across the patch. However, the equation does assure that if the specified
number of triangles is used, the tolerance will be satisfied.
References
Wang, G.-Z. 1984. The subdivision method for finding the intersection between two Bezier curves
or surfaces, Zhejiang University Journal: Special Issue on Computational Geometry, 108–119
(in Chinese).
Filip, D., Magedson,R. and Markot,R. 1986, Surface algorithms using bounds on derivatives, Com-
puter Aided Geometric Design 3, 295–311.
Zheng, J. and Sederberg, T. 2000. Estimating tessellation parameter intervals for rational curves
and surfaces. ACM Transactions on Graphics 19(1), 56–77.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
NURBS Surface 167
(a) Two bicubic Bézier surface patches. (b) Each matching pair of control curves is C n .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
168 T-Splines
(a) A NURBS surface and its con- (b) After inserting one knot in the (c) After inserting one knot in the
trol grid. t direction. s direction.
curves, and then split each resulting t-control curve into Bézier curves. The most efficient way to
evaluate a NURBS surface is to first split it into Bézier surfaces, then evaluate the Bézier surfaces.
(a) Inserting triple knots in the s (b) Inserting triple knots in the t (c) The Bézier surfaces, moved
direction. direction. apart.
15.7 T-Splines
A serious weakness with NURBS surfaces is that NURBS control points must lie topologically in a
rectangular grid. This means that typically, a large number of NURBS control points serve no pur-
pose other than to satisfy topological constraints. They carry no significant geometric information.
In Figure 15.10.a, all the red NURBS control points are, in this sense, superfluous. T-splines are a
generalization of NURBS surfaces that are capable of significantly reducing the number of superfluous
control points. Peer-reviewed papers on T-Splines include [SZBN03, SCF+ 04, SLSH12, BCC+ 10].
Figure 15.10.b shows a T-spline control grid which was obtained by eliminating the superfluous
control points from the NURBS model. The main difference between a T-mesh (i.e., a T-spline
control mesh) and a NURBS control mesh is that T-splines allow a row of control points to terminate.
The final control point in a partial row is called a T-junction. The T-junctions are shown in purple
in Figure 15.10.b.
Figure 15.11 shows another example in which the superfluous control points in a NURBS are
removed to create a T-spline. The T-spline model is geometrically equivalent to the NURBS model,
yet has only 1/3 as many control points.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
T-Splines 169
Figure 15.10: Head modeled (a) as a NURBS with 4712 control points and (b) as a T-spline with
1109 control points. The red NURBS control points are superfluous.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
170 T-Splines
Superfluous control points are a serious nuisance for designers, not merely because they require
the designer to deal with more data, but also because they can introduce unwanted ripples in the
surface as can be seen by comparing the forehead in the NURBS model in Figure 15.12.a with that
of the T-spline model in Figure 15.12.b. Designers can waste dozens of hours on models such as this
in tweaking the NURBS control points while attempting to remove unwanted ripples. Figure 15.10.a
shows a NURBS head model. Figure 15.10 shows the respective NURBS and T-spline control meshes
for the surfaces in Figure 15.12. Over 3/4 of the 4712 NURBS control points are superfluous and
do not appear in the T-spline control mesh.
T-splines can be used to merge non-uniform B-spline surfaces that have different knot-vectors.
Figure 15.13.a shows a hand model comprised of seven B-spline surfaces. The small rectangular area
is blown up in Figure 15.13.b to magnify a hole where neighboring B-spline surfaces do not match
exactly. The presence of such gaps places a burden on designers, who potentially must repair a
widened gap whenever the model is deformed. Figure 15.13.c shows the model after being converted
into a gap-free T-spline, thereby eliminating the need for repair.
(a) Model of a hand comprised of B-spline surfaces. (b) NURBS surfaces. (c) T-Spline.
Figure 15.13: A gap between two B-spline surfaces, fixed with a T-spline.
While the notion of T-splines extends to any degree, we restrict our discussion to cubic T-splines.
Cubic T-splines are C 2 in the absence of multiple knots.
1. The sum of knot intervals on opposing edges of any face must be equal. Thus, for face F in
Figure 15.14, d2 + d6 = d7 and e6 + e7 = e8 + e9 .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
T-Splines 171
e5
d0 P3
t5
e4
d7
e7 e9
t4
F e8 e3
e6 P2 d5
t3
d2 d6 d8
e2
P1 t2
e1
d1 d2 d3 d4
t1
e0
s1 s2 s3 s4 s5
of the face (thereby splitting the face into two faces) without violating Rule 1, that edge must
be included in the T-mesh.
It is possible to infer a local knot coordinate system from the knot intervals on a T-mesh. To
impose a knot coordinate system, we first choose a control point whose pre-image will serve as the
origin for the parameter domain (s, t) = (0, 0). For the example in Figure 15.15, we designate (s0 , t0 )
to be the knot origin.
Once a knot origin is chosen, we can assign an s knot value to each vertical edge in the T-mesh
topology, and a t knot value to each horizontal edge in the T-mesh topology. In Figure 15.15, those
knot values are labeled si and ti . Based on our choice of knot origin, we have s0 = t0 = 0, s1 = d1 ,
s2 = d1 + d2 , s3 = d1 + d2 + d3 , t1 = e1 , t2 = e1 + e2 , and so forth. Likewise, each control point has
knot coordinates. For example, the knot coordinates for P0 are (0, 0), for P1 are (s2 , t2 + e6 ), for
P2 are (s5 , t2 ), and for P3 are (s5 , t2 + e6 ).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
172 T-Splines
The knot coordinate system is used in writing an explicit formula for a T-spline surface:
Pn
i=1 wi Pi Bi (s, t)
P(s, t) = P n , (15.7)
i=1 wi Bi (s, t)
where Pi = (xi , yi , zi , wi ) are control points in P 4 whose weights are wi , and whose Cartesian
coordinates are w1i (xi , yi , zi ). Likewise, the Cartesian coordinates of points on the surface are given
by Pn
(x , y , z )B (s, t)
Pn i i i i
i=1
. (15.8)
i=1 wi Bi (s, t)
Bi (s, t) = N [si0 , si1 , si2 , si3 , si4 ](s)N [ti0 , ti1 , ti2 , ti3 , ti4 ](t) (15.9)
where N [si0 , si1 , si2 , si3 , si4 ](s) is the cubic B-spline basis function associated with the knot vector
and N [ti0 , ti1 , ti2 , ti3 , ti4 ](t) is associated with the knot vector
as illustrated in Figure 15.16. The designer is free to adjust the weights wi to obtain additional
shape control, as in rational B-splines. As we shall see in Section 15.7.2, weights also play a role in
the local refinement algorithm.
The T-spline equation is very similar to the equation for a tensor-product rational B-spline
surface. The difference between the T-spline equation and a B-spline equation is in how the knot
vectors si and ti are determined for each blending function Bi (s, t). Knot vectors si (15.10) and ti
(15.11) are inferred from the T-mesh neighborhood of Pi . Since we will refer to the rule whereby
the knot vectors are inferred, we formally state it as
Rule 1. Knot vectors si (15.10) and ti (15.11) for the blending function of Pi are determined
as follows. (si2 , ti2 ) are the knot coordinates of Pi . Consider a ray in parameter space R(α) =
(si2 + α, ti2 ). Then si3 and si4 are the s coordinates of the first two s-edges intersected by the ray
(not including the initial (si2 , ti2 )). By s-edge, we mean a vertical line segment of constant s. The
other knots in si and ti are found in like manner.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
T-Splines 173
We illustrate Rule 1 by a few examples. The knot vectors for P1 in Figure 15.15 are s1 =
[s0 , s1 , s2 , s3 , s4 ] and t1 = [t1 , t2 , t2 + e6 , t4 , t5 ]. For P2 , s2 = [s3 , s4 , s5 , s6 , s7 ] and t2 = [t0 , t1 , t2 , t2 +
e6 , t4 ]. For P3 , s3 = [s3 , s4 , s5 , s7 , s8 ] and t3 = [t1 , t2 , t2 + e6 , t4 , t5 ]. Once these knot vectors are
determined for each blending function, the T-spline is defined using (15.7) and (15.9).
Numerical Example
Figure 15.17.a shows a T-mesh in knot interval form. While it is possible to work entirely in knot
interval form, our discussion is simplified if we convert to knot vector form. We do this by assigning
the lower-left corner of the domain to have parameter coordinates (s, t) = (0, 0). Then, the knot
lines are determined from the knot intervals, as shown in Figure 15.17.b.
t
P24 P25 6 P26 P27 P24 P25 P26 P27
7
1
P18 P19 P20 P21 3 P22 P23 P18 P19 P20 P21 P22 P23
6
1 P P14 P15 P16 P17 P13 P14 P15 P16 P17
13 2 5
2 (3,4)
5
P10 P11 P12 P10 P11 P12
3
P4 P5 P6 3 P7 2 P8 P9 P4 P5 P6 P7 P8 P9
1
1
1
P0 P1 6 P2 P3 P0 P1 P2 P3 s
0
1 1
0 1 2 4 5 7 8
We now examine the equation P(3, 4) for the T-Spline shown in Figure 15.17.b.
Recall from (15.9) that
Bi (3, 4) = N [si0 , si1 , si2 , si3 , si4 ](3)N [ti0 , ti1 , ti2 , ti3 , ti4 ](4) (15.13)
B10 (3, 4) = N [0, 1, 2, 5, 7](3)N [0, 1, 3, 5, 6](4), B15 (3, 4) = N [1, 2, 4, 5, 7](3)N [1, 3, 5, 6, 7](4),
B0 (3, 4) = N [s0 , s1 , 0, 1, 7](3)N [t0 , t1 , 0, 1, 6](4), B27 (3, 4) = N [1, 7, 8, s2 , s3 ](3)N [1, 6, 7, t2 , t3 ](4).
We now show how to compute B10 (3, 4). The basis function N [0, 1, 2, 5, 7](s) can be written
as an explicit B-Spline curve with seven control points whose polar labels (with y-coordinates)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
174 T-Splines
Likewise,
B2 (3, 4) = B9 (3, 4) = B17 (3, 4) = B18 (3, 4) = B23 (3, 4) = B25 (3, 4) = B26 (3, 4) = 0.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
T-Splines 175
−k
where c3 = 1 and d3 = ss44−s 1
. If k ≤ s0 or k ≥ s4 , N (s) does not change.
A T-spline function B(s, t) can undergo knot insertion in either s or t, thereby splitting it into two
scaled blending functions that sum to the initial one. Further insertion into these resultant scaled
blending functions yields a set of scaled blending functions that sum to the original. For example,
Figure 15.18.a shows the knot vectors for a T-spline blending function B1 , and Figure 15.18.b shows
a refinement of the knot vectors in Figure 15.18.a. By appropriate application of (21.4)—(15.17),
we can obtain
B1 (s, t) = c11 B̃1 (s, t) + c21 B̃2 (s, t) + c31 B̃3 (s, t) + c41 B̃4 (s, t). (15.18)
Since S1 ⊂ S2 , each Bi (s, t) can be written as a linear combination of the B̃j (s, t):
ñ
X
Bi (s, t) = cji B̃j (s, t). (15.21)
j=1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
176 T-Splines
We require that
P(s, t) ≡ P̃(s, t). (15.22)
This is satisfied if
n
X
P̃j = cji Pi . (15.23)
i=1
Thus, the element at row j and column i of M1,2 in (15.19) is cji . In this manner, it is possible
to find transformation matrices Mi,j that maps any T-spline in Si to an equivalent T-spline in Sj ,
assuming Si ⊂ Sj .
The definition of a T-spline subspace Si ⊂ Sj means more than simply that the preimage of Sj
has all of the control points that the preimage of Si has.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
T-Splines 177
blending function, and each blending function’s knot vectors are defined by Rule 1. In our discussion,
we temporarily decouple the blending functions from the T-mesh. This means that during the flow
of the algorithm, we temporarily permit the existence of blending functions that violate Rule 1, and
control points to which no blending functions are attached.
Our discussion distinguishes three possible violations that can occur during the course of the
refinement algorithm:
• Violation 1 A blending function is missing a knot dictated by Rule 1 for the current T-mesh.
• Violation 2 A blending function has a knot that is not dictated by Rule 1 for the current
T-mesh.
If no violations exist, the T-spline is valid. If violations do exist, the algorithm resolves them one
by one until no further violations exist. Then a valid superspace has been found.
The topology phase of our local refinement algorithm consists of these steps:
2. If any blending function is guilty of Violation 1, perform the necessary knot insertions into
that blending function.
3. If any blending function is guilty of Violation 2, add an appropriate control point into the
T-mesh.
Resolving all cases of Violation 1 and 2 will automatically resolve all cases of Violation 3.
We illustrate the algorithm with an example. Figure 15.20.a shows an initial T-mesh into which
we wish to insert one control point, P2 . Because the T-mesh in Figure 15.20.a is valid, there
are no violations. But if we simply insert P2 into the T-mesh (Figure 15.20.b) without chang-
ing any of the blending functions, we introduce several violations. Since P2 has knot coordinates
(s3 , t2 ), four blending functions become guilty of Violation 1: those centered at (s1 , t2 ), (s2 , t2 ),
(s4 , t2 ), and (s5 , t2 ). To resolve these violations, we must insert a knot at s3 into each of those
blending functions, as discussed in Section 15.7.3. The blending function centered at (s2 , t2 ) is
N [s0 , s1 , s2 , s4 , s5 ](s)N [t0 , t1 , t2 , t3 , t4 ](t). Inserting a knot s = s3 into the s knot vector of this blend-
ing function splits it into two scaled blending functions: c2 N [s0 , s1 , s2 , s3 , s4 ](s)N [t0 , t1 , t2 , t3 , t4 ](t)
(Figure 15.20.c) and d2 N [s1 , s2 , s3 , s4 , s5 ](s)N [t0 , t1 , t2 , t3 , t4 ](t) (Figure 15.20.d) as given in (15.16).
The blending function c2 N [s0 , s1 , s2 , s3 , s4 ](s)N [t0 , t1 , t2 , t3 , t4 ](t) in Figure 15.20.c satisfies Rule
1. Likewise, the refinements of the blending functions centered at (s1 , t2 ), (s4 , t2 ), and (s5 , t2 ) all sat-
isfy Rule 1. However, the t knot vector of blending function d2 N [s1 , s2 , s3 , s4 , s5 ](s)N [t0 , t1 , t2 , t3 , t4 ](t)
shown in Figure 15.20.d is guilty of Violation 2 because the blending function’s t knot vector is
[t0 , t1 , t2 , t3 , t4 ], but Rule 1 does not call for a knot at t3 . This problem cannot be remedied by
refining this blending function; we must add an additional control point into the T-mesh.
The needed control point is P3 in Figure 15.20.e. Inserting that control point fixes the case
of Violation 2, but it creates a new case of Violation 1. As shown in Figure 15.20.f, the blending
function centered at (s2 , t3 ) has an s knot vector that does not include s3 as required by Rule 1.
Inserting s3 into that knot vector fixes the problem, and there are no further violations of Rule 1.
This algorithm is always guaranteed to terminate, because the only blending function refinements
and control point insertions must involve knot values that initially exist in the T-mesh, or that were
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
178 T-Splines
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Efficient Computation of Points and Tangents on a Bézier surface patch. 179
added in Step 1. In the worst case, the algorithm would extend all partial rows of control points
to cross the entire surface. In practice, the algorithm typically requires few if any additional new
control points beyond the ones the user wants to insert.
with
n
X
P(t) = (Px (t), Py (t), Pz (t), Pw (t)) = Pi Bin (t) (15.25)
i=0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
180 Efficient Computation of Points and Tangents on a Bézier surface patch.
where Pi = wi (xi , yi , zi , 1) and the projection operator Π is defined Π(x, y, z, w) = (x/w, y/w, z/w).
In this section, we will use upper case bold-face variables to denote four-tuples (homogeneous points)
and lower case bold-face for triples (points in R3 ).
The point and tangent of this curve can be found using the familiar construction
with
n−1
X
Q(t) = Pi Bin−1 (t) (15.27)
i=0
and
n
X
n−1
R(t) = Pi Bi−1 (t) (15.28)
i=1
where line q(t)—r(t) ≡ Π (Q(t))—Π (R(t)) is tangent to the curve, as seen in Figure 16.1. As a
sidenote, the correct magnitude of the derivative of p(t) is given by
p2 pn-2
p1 q(t)
p(t) r(t)
pn-1
p0 pn
The values Q(t) and R(t) can be found using the modified Horner’s algorithm for Bernstein
polynomials, involving a pseudo–basis conversion
n−1
Q(t) X
= Q̂(u) = Q̂i ui (15.30)
(1 − t)n−1 i=0
t
and Q̂i = n−1
where u = 1−t i Pi , i = 0, 1, . . . , n − 1. Assuming the curve is to be evaluated several
times, we can ignore the expense of precomputing the Q̂i , and the nested multiplication
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Efficient Computation of Points and Tangents on a Bézier surface patch. 181
can be performed with n − 1 multiplies and adds for each of the four x, y, z, w coordinates. It is not
necessary to post-multiply by (1 − t)n−1 , since
Π (Q(t)) = Π (1 − t)n−1 Q̂(u) = Π Q̂(t) . (15.32)
Therefore, the point P(t) and its tangent direction can be computed with roughly 2n multiplies and
adds for each of the four x, y, z, w coordinates.
This method has problems near t = 1, so it is best for .5 ≤ t ≤ 1 to use the form
n−1
Q(t) X
= Q̂n−i−1 ui (15.33)
tn−1 i=0
with u = 1−t
t .
A tensor product rational Bézier surface patch is defined
where
m X
X n
P(s, t) = Pij Bim (s)Bjn (t). (15.35)
i=0 j=0
P(s, t) = (1 − s)(1 − t)P00 (s, t) + s(1 − t)P10 (s, t) + (1 − s)tP01 (s, t) + stP11 (s, t) (15.36)
where
m−1
X n−1
X
P00 (s, t) = Pij Bim−1 (s)Bjn−1 (t), (15.37)
i=0 j=0
m n−1
X X
m−1
P10 (s, t) = Pij Bi−1 (s)Bjn−1 (t), (15.38)
i=1 j=0
m−1
XX n
P01 (s, t) = Pij Bim−1 (s)Bj−1
n−1
(t), (15.39)
i=0 j=1
m X
X n
m−1 n−1
P11 (s, t) = Pij Bi−1 (s)Bj−1 (t). (15.40)
i=1 j=1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
182 Curvature at the Corner of a Bézier Surface Patch
s t m−1 n−1
where u = 1−s , v = 1−t , and P̂kl
ij = i−k j−l Pij . The n rows of these four bivariate polynomials
can each be evaluated using m − 1 multiplies and adds per x, y, z, w component, and the final
evaluation in t costs n − 1 multiplies and adds per x, y, z, w component.
Thus, if m = n, the four surfaces P00 (s, t), P01 (s, t), P10 (s, t), and P11 (s, t) can each be evaluated
using n2 − 1 multiplies and n2 − 1 adds for each of the four x, y, z, w components, a total of 16n2 − 16
multiplies and 16n2 − 16 adds.
If one wishes to compute a grid of points on this surface which are evenly spaced in parameter
space, the four surfaces P00 (s, t), P01 (s, t), P10 (s, t), and P11 (s, t) can each be evaluated even more
quickly using forward differencing.
n − 1 ω0 ω2 h
k= (15.44)
n ω12 a2
where a is the length of edge P0 P1 , and h is the distance of P2 to the tangent spanned by P0
and P1 (see Figure 15.23). This formula is more intuitive than the one given by classic differential
geometry, and is also easier to compute, especially in the rational case.
Pn
P2
h
P0 a P1
This section derives similar formulae for Gaussian and mean curvatures of rational Bézier patches.
The derived formulae are expressed in terms of simple geometric quantities of the control mesh.
k
where Bik (t) = i (1 − t)k−i ti are Bernstein polynomials; Pij are the control points, forming a
control mesh; and wij are the weights. When all the weights are the same, the patch reduces to a
polynomial surface. We derive the curvature formulae at the bottom-left corner (u, v) = (0, 0).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curvature at the Corner of a Bézier Surface Patch 183
P02
h02
d
P01
P11
b f
h11
S e
P00 !
a P20
c h20
P10
E = ru · ru , F = ru · rv , G = rv · rv , (15.48)
Furthermore, let S denote the area of the triangle P00 P10 P01 , θ be the angle between vectors P00 P10
and P00 P01 , and hij be the signed distance from Pij to the plane spanned by P00 , P10 and P01 .
If Pij lies on the side of the plane P00 P10 P01 with the direction P00 P10 × P00 P01 , hij is positive.
Otherwise, hij is negative.
It is easy to check that at (u, v) = (0, 0), we have
ω10 ω01
ru (0, 0) = n a, rv (0, 0) = m b. (15.51)
ω00 ω00
For notational simplicity, in the following where there is no ambiguity, we omit the parameter values
(0, 0). Thus
2 2
ω10 ω10 ω01 ω01
E = n2 a · a, F = nm 2 a · b, G = m2
b · b. (15.52)
ω00 ω00 ω00
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
184 Curvature at the Corner of a Bézier Surface Patch
Note that for a rational surface r(u, v) = R(u, v)/ω(u, v), the first partial derivative ru (u, v) =
Ruu − rωuu Ru ωu − rωu2 ωu
(Ru −r ωu )/ω, and the second partial derivative ruu = − −ru . Applying
ω ω2 ω
these to the rational Bézier patch (15.45) and letting (u, v) = (0, 0) lead to
ω20
ruu = n(n − 1) c + (· · · )a
ω00
where (· · · ) denotes a rather complicated expression that we will not need to be concerned with
since subsequent dotting with n will cause it to vanish. Similarly, we can obtain
ω11
ruv = nm f + (· · · )a + (· · · )b,
ω00
ω02
rvv = m(m − 1) d + (· · · )b.
ω00
Also note that n = a × b/ka × bk. By the definition (15.49) of L, M and N , we have
ω20 ω11 ω02
L = n(n − 1) h20 , M = nm h11 , N = m(m − 1) h02 . (15.53)
ω00 ω00 ω00
Now substituting (15.52) and (15.53) into (15.46) and (15.47), and doing some simplifications,
we get the formulae for Gaussian and mean curvatures
2 n−1 m−1 2 2
− ω11
ω00 n m ω20 ω02 h20 h02 h11
Kg = , (15.54)
ω10 ω01 ka × bk2
n−1 2 2 m−1 2 2
ω00 n ω01 b ω20 h20 − 2ω10 ω01 (a · b)ω11 h11 + m ω10 a ω02 h02
Km = 2 2 . (15.55)
ω10 ω01 2ka × bk2
If we further introduce notations
ω10 ω01 1 ω10 ω01 ω10 ω01
ã = kak, b̃ = kbk, S̃ = k a× bk = S 2 ,
ω00 ω00 2 ω00 ω00 ω00
ω11 n − 1 ω20 m − 1 ω02
h̃11 = h11 , h̃20 = h20 , h̃02 = h02 ,
ω00 n ω00 m ω00
then the formulae can be symbolically simplified to
Kg = h̃20 h̃02 − h̃211 /4S̃ 2 , (15.56)
Km = h̃20 b̃2 − 2h̃11 ã b̃ cos θ + h̃02 ã2 /8S̃ 2 . (15.57)
Remark 1. Obviously, formulae (15.54) and (15.55) or (15.56) and (15.57) just contain some
simple geometric quantities, like (scaled) length or area, related to the control mesh of the rational
Bézier patch. Compared to the formulae (15.46) and (15.47), they are more intuitive and also simpler
to compute.
Remark 2. Though the equations derived above are valid at the bottom-left corner, by sym-
metry similar formulae are easily written out at the other three corners of the rational Bézier patch.
Moreover, at any point of the surface other than the four corners, the formulae can also be used to
calculate curvatures with help of subdividing the surface there.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curvature at the Corner of a Bézier Surface Patch 185
P02(n-2)
h02
P01(n-1) P11(n-2)
b h11
! S
P00n P20(n-2)
a
P10(n-1) h20
Remark 3. According to differential geometry, from Gaussian and mean curvatures, we can
compute the principal curvatures
q
k1,2 = Km ± 2 −K .
Km g
du M − k1,2 F N − k1,2 G
=− =− .
dv L − k1,2 E M − k1,2 F
n
P
ωijk Pijk Bijk (u, v)
i+j+k=n
r(u, v) = P n (u, v) (15.58)
ωijk Bijk
i+j+k=n
n n! i j
where Bijk (u, v) = u v (1 − u − v)k are Bernstein polynomials; Pijk are the control points,
i!j!k!
forming a triangular control mesh (see Figure 15.25); and ωijk are the weights.
As in the tensor-product case, we only consider the curvatures at corner (u, v) = (0, 0). Although
we can follow the straightforward approach of Section 15.9.1, i.e., computing the partial derivatives
of the triangular Bézier patch, here we take another approach. Since the triangular patch r(u, v) can
be considered as a degree n × n tensor-product rational Bézier patch, we can utilize the established
formulae (15.54) and (15.55).
Let a = P10(n−1) −P00n , b = P01(n−1) −P00n , S denote the area of the triangle P00n P10(n−1) P01(n−1) ,
θ be the angle between vectors P00n P10(n−1) and P00n P01(n−1) , and hij be the signed distance from
Pij(n−i−j) to the plane spanned by P00n , P10(n−1) and P01(n−1) . Suppose the tensor-product rep-
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
186 Curvature at the Corner of a Bézier Surface Patch
It is easy to show that P̄ij = Pij(n−i−j) and ω̄ij = ωij(n−i−j) for (i, j) = (0, 0), (1, 0), and (0, 1). Thus
the geometric quantities, like a, b, hij , and etc., are the same as their counterparts in the tensor-
product representation except for h11 . Therefore we only need to check P̄11 and ω̄11 . Considering
the mixed derivative of the denominators of the above two representations at (u, v) = (0, 0), we get
n−1 ω10(n−1) + ω01(n−1) − ω00n
ω̄11 = ω11(n−2) +
n n
Similarly, by considering the numerators, we have
n − 1 ω11(n−2) ω10(n−1) P10(n−1) + ω01(n−1) P01(n−1) − ω00n P00n
P̄11 = P11(n−2) +
n ω̄11 nω̄11
n−1
If we denote the signed distance of P̄11 to the plane P̄00 P̄10 P̄01 by h̄11 , then ω̄11 h̄11 = ω11(n−2) h11 .
n
We substitute all the above relations into (15.54) and (15.55), and the formulae of Gaussian and
mean curvatures for the triangular rational Bézier patch (15.58) turn out to be
2
h211
2 2
ω20(n−2) ω02(n−2) h20 h02 − ω11(n−2)
n−1 ω00n
Kg = , (15.59)
n ω10(n−1) ω01(n−1) ka × bk2
n−1 ω00n
Km = 2 2 ·
n ω10(n−1) ω01(n−1)
2 (15.60)
ω01(n−1) b2 ω20(n−2) h20 − 2ω10(n−1) ω01(n−1) (a · b)ω11(n−2) h11 + ω10(n−1)
2
a2 ω02(n−2) h02
,
2ka × bk2
or just (15.56) and (15.57) if the following notations are adopted
ω10(n−1) ω01(n−1)
ã = kak, b̃ = kbk,
ω00n ω00n
ω10(n−1) ω01(n−1) n − 1 ωij(n−i−j)
S̃ = S 2 , h̃ij = hij .
ω00n n ω00n
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 16
This chapter presents an algorithm for computing points and tangents on a tensor-product rational
Bézier surface patch that has O(n2 ) time complexity.
A rational Bézier curve in R3 is defined
with
n
X
P(t) = (Px (t), Py (t), Pz (t), Pw (t)) = Pi Bin (t) (16.2)
i=0
where Pi = wi (xi , yi , zi , 1) and the projection operator Π is defined Π(x, y, z, w) = (x/w, y/w, z/w).
We will use upper case bold-face variables to denote four-tuples (homogeneous points) and lower
case bold-face for triples (points in R3 ).
The point and tangent of this curve can be found using the familiar construction
with
n−1
X
Q(t) = Pi Bin−1 (t) (16.4)
i=0
and
n
X
n−1
R(t) = Pi Bi−1 (t) (16.5)
i=1
where line q(t)—r(t) ≡ Π (Q(t))—Π (R(t)) is tangent to the curve, as seen in Figure 16.1. As a
sidenote, the correct magnitude of the derivative of p(t) is given by
187
188
p2 pn-2
p1 q(t)
p(t) r(t)
pn-1
p0 pn
The values Q(t) and R(t) can be found using the modified Horner’s algorithm for Bernstein
polynomials, involving a pseudo–basis conversion
n−1
Q(t) X
n−1
= Q̂(u) = Q̂i ui (16.7)
(1 − t) i=0
t
and Q̂i = n−1
where u = 1−t i Pi , i = 0, 1, . . . , n − 1. Assuming the curve is to be evaluated several
times, we can ignore the expense of precomputing the Q̂i , and the nested multiplication
can be performed with n − 1 multiplies and adds for each of the four x, y, z, w coordinates. It is not
necessary to post-multiply by (1 − t)n−1 , since
Π (Q(t)) = Π (1 − t)n−1 Q̂(u) = Π Q̂(t) . (16.9)
Therefore, the point P(t) and its tangent direction can be computed with roughly 2n multiplies and
adds for each of the four x, y, z, w coordinates.
This method has problems near t = 1, so it is best for .5 ≤ t ≤ 1 to use the form
n−1
Q(t) X
= Q̂n−i−1 ui (16.10)
tn−1 i=0
with u = 1−t
t .
A tensor product rational Bézier surface patch is defined
where
m X
X n
P(s, t) = Pij Bim (s)Bjn (t). (16.12)
i=0 j=0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
189
P(s, t) = (1 − s)(1 − t)P00 (s, t) + s(1 − t)P10 (s, t) + (1 − s)tP01 (s, t) + stP11 (s, t) (16.13)
where
m−1
X n−1
X
P00 (s, t) = Pij Bim−1 (s)Bjn−1 (t), (16.14)
i=0 j=0
m n−1
X X
m−1
P10 (s, t) = Pij Bi−1 (s)Bjn−1 (t), (16.15)
i=1 j=0
m−1
XX n
P01 (s, t) = Pij Bim−1 (s)Bj−1
n−1
(t), (16.16)
i=0 j=1
m X
X n
11 m−1 n−1
P (s, t) = Pij Bi−1 (s)Bj−1 (t). (16.17)
i=1 j=1
s t m−1 n−1
where u = 1−s , v = 1−t , and P̂kl
ij = i−k j−l Pij . The n rows of these four bivariate polynomials
can each be evaluated using m − 1 multiplies and adds per x, y, z, w component, and the final
evaluation in t costs n − 1 multiplies and adds per x, y, z, w component.
Thus, if m = n, the four surfaces P00 (s, t), P01 (s, t), P10 (s, t), and P11 (s, t) can each be evaluated
using n2 − 1 multiplies and n2 − 1 adds for each of the four x, y, z, w components, a total of 16n2 − 16
multiplies and 16n2 − 16 adds.
If one wishes to compute a grid of points on this surface which are evenly spaced in parameter
space, the four surfaces P00 (s, t), P01 (s, t), P10 (s, t), and P11 (s, t) can each be evaluated even more
quickly using forward differencing.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
190
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 17
Initially, the field of computer aided geometric design and graphics drew most heavily from differen-
tial geometry, approximation theory, and vector geometry. Since the early 1980’s, some of the tools
of algebraic geometry have been introduced into the CAGD literature. This chapter presents some
of those tools, which can address the following problems:
x(t) y(t)
1. Given a planar curve defined parametrically as x = w(t) , y = w(t) where x(t), y(t), and w(t)
are polynomials, find an implicit equation f (x, y) = 0 which defines the same curve. This
process of parametric to implicit conversion will be referred to as implicitization.
x(t) y(t)
2. Given the (x, y) coordinates of a point which lies on a parametric curve x = w(t) , y = w(t) ,
find the parameter value t which corresponds to that point. This problem will be referred to
as the inversion problem.
3. Compute the points of intersection of two parametric curves using the implicitization and inver-
sion techniques.
Section 1.4 presents some preliminary terminology and theorems. Sections 17.1 through 17.4
discuss the implicitization and inversion of planar curves, and Section 17.5 applies those tools to
computing curve intersections. Section 17.8 discusses some special properties of parametric cubic
curves and Section 17.9 overviews surface implicitization. Section 17.11 discusses Gróbner bases.
17.1 Implicitization
It was noted that there are basically two ways that a planar curve can be defined: parametrically
(x = x(t)/w(t), y = y(t)/w(t)) and implicitly (f (x, y) = 0).
Obviously, the parametric equation of a curve has the advantage of being able to quickly compute
the (x, y) coordinates of several points on the curve for plotting purposes. Also, it is simple to define
a curve segment by restricting the parameter t to a finite range, for example 0 ≤ t ≤ 1. On the other
hand, the implicit equation of a curve enables one to easily determine whether a given point lies on
the curve, or if not, which side of the curve it lies on.
Given these two different equations for curves, it is natural to wonder if it is possible to convert
between representations for a given curve. The answer is that it is always possible to find an
implicit equation of a parametric curve, but a parametric equation can generally be found only
191
192 Brute Force Implicization
for implicit curves of degree two or one. The process of finding the implicit equation of a curve
which is expressed parametrically is referred to as implicitization. In Section 17.4, we will discuss
how this can be accomplished using an important algebraic tool, the resultant, and Section 17.3
discusses resultants. Section 17.2 suggests how someone might tackle the implicitization problem
before learning about resultants. Section 17.5 applies these ideas to the problem of intersecting two
parametric curves.
x = t + 2 y = 3t + 1,
we can easily find an implicit equation which identically represents this line by solving for t as a
function of x
t = x − 2
and substituting into the equation for y:
y = 3(x − 2) + 1
or 3x − y − 5 = 0. Note that this implicit equation defines precisely the same curve as does the
parametric equation. We can also identify two inversion equations (for finding the parameter value
of a point on the line): t = x − 2 or t = (y − 1)/3.
This approach to implicitization also works for degree two parametric curves. Consider the
parabola
x = t2 + 1 y = t2 + 2t − 2.
Again, we can solve for t as a function of x:
√
t = ± x − 1
to yield
x2 − 2xy + y 2 − 10x + 6y + 13 = 0
which is the desired implicit equation. Again, this implicit equation defines exactly the same curve
as does the parametric equation.
We run into trouble if we try to apply this implicitization technique to curves of degree higher
than two. Note that the critical step is that we must be able to express t as a function of x. For
cubic and quartic equations, this can be done, but the resulting expression is hopelessly complex.
For curves of degree greater than four, it is simply not possible.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Polynomial Resultants 193
We cannot obtain an inversion equation for this parabola the way we did for the straight line.
For example, suppose we want to find the parameter of the point (5, −2) which we know to lie on
the curve. The brute force approach would be to find the values of t which satisfy the equation
x = 5 = t2 + 1
and then to compare them with the values of t which satisfy the equation
y = − 2 = t2 + 2t − 2.
In the first case, we find t = -2 or 2, and in the second case, t = -2 or 0. The value of t which
satisfies both equations is -2, which must therefore be the parameter value of the point (5,-2).
This unsuccessful attempt at implicitization and inversion motivates the following discussion
of resultants, which will provide an elegant, general solution to the implicitization and inversion
problems.
The resultant of f (t) and g(t), written R(f, g), is an expression for which R(f, g) = 0 if and only
iff (t) and g(t) have a common root.
Consider the resultant of two polynomials given in factored form:
f (t) = (t − f1 )(t − f2 ) · · · (t − fm ), g(t) = (t − g1 )(t − g2 ) · · · (t − gn ) (17.2)
where f1 , f2 , . . . fm are the roots of f (t) and g1 , g2 , . . . gn are the roots of g(t). The resultant of
f (t) and g(t) is the unique polynomial expression that will be zero if and only if at least one fi is
the same as at least one gi :
Ym Y n
R(f, g) = (fi − gj )
i=1 j=1
is
R(f, g) = (3 − 2)(3 − 1)(4 − 2)(4 − 1) = 12 (17.3)
while the resultant of f (t) = t2 − 7t + 12 = (t − 3)(t − 4) and g(t) = t2 − 5t + 6 = (t − 2)(t − 3) is
R(f, g) = (3 − 2)(3 − 3)(4 − 2)(4 − 3) = 0.
Of course, if f (t) and g(t) are given in factored form, it is a trivial matter to detect if they have any
common roots. However, it takes a fair amount of computation to determine all roots of a polynomial,
and those roots are typically not rational and often complex. Therefore, of much greater value would
an equation for a resultant that does not require the polynomials to be given in factored form, but
can be computed directly from equations (17.1). The good news is that such equations for a resultant
do exist and are relatively easy to compute, without needing to first compute any polynomial roots.
Such an equation for the resultant can be written in closed form. Furthermore, if the polynomial
coefficients are integers, the resultant will also be an integer, even if the roots are complex!
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
194 Polynomial Resultants
f (t) = a1 t + a0 ; g(t) = b1 t + b0 .
The root of f (t) and the root of g(t) are easily found:
a0 b0
a1 t + a0 = 0 → t = − ; b1 t + b0 = 0 → t = − ;
a1 b1
Since each polynomial has exactly one root, f (t) and g(t) have a common root if and only if
a0 b0
− = , or a1 b0 − b1 a0 = 0.
a1 b1
R(f, g) = a1 b0 − b1 a0 . (17.4)
We can also derive this resultant using matrix algebra. This will make more sense if we use the
homogeneous form
f (T, U ) = a1 T + a0 U ; g(T, U ) = b1 T + b0 U
where t = T /U The equations f (T, U ) = 0 and g(T, U ) = 0 can be written
a1 a0 T 0
= (17.5)
b1 b0 U 0
This is a system of homogeneous linear equations. We know from linear algebra that the necessary
and sufficient condition for this system to have a solution is if the determinant of the matrix is zero,
that is, if
a1 a0
b1 b0 = a1 b0 − b1 a0 = 0
Example: Do f (t) = 2t + 1 and g(t) = t + 3 have a common root? They have a common root if and
only if their resultant is zero. Since R(f, g) = 2 · 3 − 1 · 1 = 5 6= 0, they do not have a common root.
Example: Do f (t) = t−2 and g(t) = 3t−6 have a common root? Since R(f, g) = 1·(−6)−3·(−2) = 0,
they do have a common root.
f (t) = a2 t2 + a1 t + a0 , g(t) = b2 t2 + b1 t + b0 .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Polynomial Resultants 195
It does not work so well to solve for the roots of these two polynomials and check for a common
root. The roots of f (t) and g(t) are, respectively,
p p
−a1 ± a21 − 4a2 a0 −b1 ± b21 − 4b2 b0
t= , t=
2a2 2b2
It is easy to verify that h1 (t) and h2 (t) will each vanish for any value of t that is a common root
of f (t) and g(t). Therefore, any common root of f (t) and g(t) is also a common root of h1 (t) and
h2 (t). Since we already have a resultant for two linear polynomials (17.4), the resultant of our two
quadratic polynomials is
(a2 b1 ) (a2 b0 )
R(f, g) = (17.8)
(a2 b0 ) (a1 b0 )
We should here note that a resultant computed by (17.3) and a resultant computed using (17.8) can
differ by a sign, and that their absolute value will be equal if a2 = b2 = 1.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
196 Polynomial Resultants
f (t) = a3 t3 + a2 t2 + a1 t + a0 g(t) = b3 t3 + b2 t2 + b1 t + b0 .
In other words, we want to determine whether there exists a value α such that f (α) = g(α) = 0
without having to actually find all roots of both polynomials and comparing. We begin by forming
three auxiliary polynomials h1 (t), h2 (t) and h3 (t) as follows:
Note that if there exists a value α such that f (α) = g(α) = 0, then h1 (α) = h2 (α) = h3 (α) = 0.
We can therefore say that f (t) and g(t) have a common root if and only if the set of equations
(a3 b0 ) t2
(a3 b2 ) (a3 b1 )
(a3 b1 ) (a3 b0 ) + (a2 b1 ) (a2 b0 ) t = 0
(a3 b0 ) (a2 b0 ) (a1 b0 ) 1
has a solution. 1 However, we know from linear algebra that this set of homogeneous linear equations
can have a solution if and only if
(a3 b2 ) (a3 b1 ) (a3 b0 )
(a3 b1 ) (a3 b0 ) + (a2 b1 ) (a2 b0 ) = 0
(a3 b0 ) (a2 b0 ) (a1 b0 )
and therefore,
(a3 b2 ) (a3 b1 ) (a3 b0 )
R(f, g) = (a3 b1 ) (a3 b0 ) + (a2 b1 ) (a2 b0 )
(a3 b0 ) (a2 b0 ) (a1 b0 )
This same approach can be used to construct the resultant of polynomials of any degree.
Let’s try this resultant on a couple of examples. First, let f (t) = t3 − 2t2 + 3t + 1 and
g(t) = 2t3 + 3t2 − t + 4. For this case,
7 −7 2
R(f, g) = −7 −5 −11 = − 1611
2 −11 13
1 Actually, we have only shown that this is a necessary condition. The proof that it is also sufficient can be found
in [GSA84].
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Determining the Common Root 197
We aren’t so much interested in the actual numerical value of the resultant, just whether it equals
zero or not. In this case, R(f, g) = − 1611 6= 0, so we conclude that f (t) and g(t) do not have a
common root.
Consider next the pair of polynomials f (t) = t3 − t2 − 11t − 4 and g(t) = 2t3 − 7t2 − 5t+
4. In this case,
−5 17 12
R(f, g) = 17 −60 −32 = 0
12 −32 −64
Since R(f, g) = 0, f (t) and g(t) do have a common root. Note that the resultant simply determines
the existence or non-existence of a common root, but it does not directly reveal the value of a
common root, if one exists. In fact, if the resultant is zero, there may actually be several common
roots. Section 17.4 discusses how to compute the common root(s).
Linear Equation Approach Our intuitive development of the resultant of two cubic polynomials
led us to a set of three linear equations in three “unknowns”: t2 , t and 1. In general, we could create
the resultant of two degree n polynomials f (t) = an tn + an−1 tn−1 + · · · + a1 t + a0 , g(t) = bn tn +
bn−1 tn−1 + · · · + b1 t + b0 , as the determinant of the coefficient matrix of n homogeneous linear
equations:
tn−1
(an bn−1 ) . . . (an b0 ) n−2
t
. . . . .
.
. . . . . . = 0
. . . . .
t
(an b0 ) . . . (a1 b0 )
1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
198 Determining the Common Root
It may be a bit confusing at first to view this as a set of homogeneous linear equations, since the
unknowns are all powers of t. Let us temporarily switch to homogeneous variables T and U :
T n−1
(an bn−1 ) . . . (an b0 )
T n−2 U
. . . . .
.
. . . . . = 0
.
. . . . .
n−2
TU
(an b0 ) . . . (a1 b0 )
U n−1
where t = T /U . After solving for any two adjacent terms T n−i U i−1 , the common root of f (t) and
n−i+1 i−2
g(t) can be obtained as t = TT n−i UUi−1 .
Cramer’s Rule There are several well known methods for solving for the T n−i U i−1 . One
way is to apply Cramer’s rule. A non-trivial solution exists (that is, a solution other than all
T n−i U i−1 = 0) only if the determinant of the matrix is zero. But, that implies that the n equations
are linearly dependent and we can discard one of them without losing any information. We discard
the last equation, and can then solve for n − 1 homogeneous equations in n homogeneous unknowns
using Cramer’s rule. It turns out that occasionally we run into trouble if we discard an equation
other than the last one. We illustrate Cramer’s rule for the case f (t) = t3 − t2 − 11t − 4 and
g(t) = 2t3 − 7t2 − 5t + 4. Recall that this is the pair for which we earlier found that R(f, g) = 0.
We have the set of equations
2
−5 17 12 T
17 −60 −32 TU = 0
2
12 −32 −64 U
Gauss Elimination A numerically superior algorithm for solving this set of equations is to
perform Gauss elimination. Two other advantages of Gauss elimination are that it can be used to
determine whether the determinant is zero to begin with, and also it reveals how many common
roots there are. We will illustrate this approach with three examples, using integer preserving Gauss
elimination. We choose the integer preserving Gauss elimination because then the lower right hand
element of the upper triangular matrix is the value of the determinant of the matrix.
Example 1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Determining the Common Root 199
Our first example is one we considered earlier: f (t) = t3 − 2t2 + 3t + 1 and g(t) = 2t3
+ 3t2 − t + 4. We set up the following set of linear equations, and triangularize the matrix using
integer preserving Gauss elimination:
2
7 −7 2 T
−7 −5 −11 TU =
2
2 −11 13 U
2
7 −7 2 T
0 −84 0 TU = 0
2
0 0 −1611 U
We observe that the only solution to this set of equations is T = U = 0, and conclude that f (t)
and g(t) do not have a common root. Note that the lower right element −1611 is the determinant
of the original matrix, or the resultant.
Example 2
We next examine the pair of polynomials f (t) = t3 − t2 − 11t − 4 and g(t) = 2t3 − 7t2 − 5t + 4.
In this case, we have 2
−5 17 12 T
17 −60 −32 TU =
2
12 −32 −64 U
2
−5 17 12 T
0 11 −44 TU = 0
2
0 0 0 U
Again, the bottom right element is the value of the determinant, which verifies that the resultant
is zero. It is now simple to compute the solution: T U = 4U 2 , T 2 = 4T U . Since t = T /U , the
common root is t = 4.
Example 3
For our final example we analyze the polynomials f (t) = t3 − 6t2 + 11t − 6 and g(t) = t3 − 7t2 + 14t − 8.
Our linear equations now are:
−1 3 −2 T 2 −1 3 −2 T 2
3 −9 6 TU = 0 0 0 TU = 0
2 2
−2 6 −4 U 0 0 0 U
In this case, not only is the resultant zero, but the matrix is rank 1. This means that there are two
common roots, and they can be found as the solution to the quadratic equation −t2 + 3t − 2,
which is t = 1 and t = 2. Another way of saying this is that −t2 + 3t − 2 is the Greatest
Common Divisor of f (t) and g(t).
Euclid’s GCD Algorithm An alternative approach to finding the common root(s) of two poly-
nomials is to use Euclid’s algorithm. This ancient algorithm can be used to find the Greatest
Common Divisor of two integers or two polynomials. A clear proof of Euclid’s algorithm can be
found in [Kur80]. Our presentation consists of a series of examples. This algorithm works beautifully
in exact integer arithmetic but we have experienced numerical instability in floating point.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
200 Determining the Common Root
Integer Example
We illustrate first on a pair of integers: 42 and 30. For the first step, we assign the larger to be the
numerator, and the other to be the denominator:
42
Step 1: 30 = 1 remainder 12.
We now take the remainder of the first step and divide it into the denominator of the first step:
30
Step 2: 12 = 2 remainder 6.
We continue dividing the remainder of the preceding step into the denominator of the preceding
step until we obtain a zero remainder. This happens to occur in the third step for this problem:
12
Step 3: 6 = 2 exactly.
According to Euclid’s algorithm, the second to last remainder is the GCD. In this case, the second
to last remainder is 6, which is clearly the largest integer that evenly divides 30 and 42.
Polynomial Example 1
We illustrate how Euclid’s algorithm works for polynomials by using the same three exam-
ples we used in the previous section. For the polynomials f (t) = t3 − 2t2 + 3t + 1 and
g(t) = 2t3 + 3t2 − t + 4, we have:
2t3 + 3t2 − t + 4
• Step 1: t3 − 2t2 + 3t + 1 = 2 remainder 7t2 − 7t + 2.
t3 − 2t2 + 3t + 1 t − 1 12t+9
• Step 2: 7t2 − 7t + 2 = 7 remainder 7
Polynomial Example 2
We next analyze the polynomials f (t) = t3 − t2 − 11t − 4 and g(t) = 2t3 − 7t2 − 5t + 4:
2t3 − 7t2 − 5t + 4
• Step 1: t3 − t2 − 11t − 4 = 2 remainder −5t2 + 17t + 12.
t3 − t2 − 11t − 4 −11t + 44
• Step 2: −5t2 + 17t + 12 = − 51 t − 12
25 remainder 25
−5t2 + 17t + 12 75
• Step 3: (−11t + 44)/25 = 125t + 11 remainder 0.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Implicitization and Inversion 201
−11t + 44
In this case, the GCD is 25 , and the common root is t = 4.
Polynomial Example 3
Finally, consider f (t) = t3 − 6t2 + 11t − 6 and g(t) = t3 − 7t2 + 14t − 8:
3
− 6t2 + 11t − 6
• Step 1: tt3 − 7t2 + 14t − 8 = 1 remainder t2 − 3t + 2
t3 − 7t2 + 14t − 8
• Step 2: t2 − 3t + 2 = t − 4 remainder 0.
The GCD is t2 − 3t + 2, and the common roots are the roots of the equation t2 − 3t + 2 = 0
which are t = 1 and t = 2.
You may have realized that there is a close connection between Euclid’s algorithm and resultants,
and obviously Euclid’s algorithm does everything for us that resultants do.
We are now prepared to apply these tools to the problems of implicitizing and inverting curves.
then
p(x, t) = (dn x − an )tn + (dn−1 x − an−1 )tn−1 + · · ·
+ (d1 x − a1 )t + (d0 x − a0 )
q(y, t) = (dn y − bn )tn + (dn−1 y − bn−1 )tn−1 + · · ·
+ (d1 y − b1 )t + (d0 y − b0 )
If we now compute the resultant of p(x, t) and q(y, t), we do not arrive at a numerical value, but rather
a polynomial in x and y which we shall call f (x, y). Clearly, any (x, y) pair for which f (x, y) = 0
causes the resultant of p and q to be zero. But, if the resultant is zero, then we know that there
exists a value of t for which p(x, t) = q(y, t) = 0. In other words, all (x, y) for which f (x, y) = 0
lie on the parametric curve and therefore f (x, y) = 0 is the implicit equation of that curve. This
should be clarified by the following examples.
Implicitization Example 1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
202 Implicitization and Inversion
Let’s begin by applying this technique to the parabola we implicitized earlier using a brute force
method:
x = t2 + 1 y = t2 + 2t − 2.
We begin by forming p(x, t) = − t2 + (x − 1) and q(y, t) = − t2 − 2t + (y + 2). The resultant
of two quadratic polynomials a2 t2 + a1 t + a0 and b2 t2 + b1 t + b0 is
(a2 b1 ) (a2 b0 )
(a2 b0 ) (a1 b0 )
Implicitization Example 2
We now implicitize the cubic curve for which
we have
R(p, q) = f (x, y) =
−117x + 6y + 564 117x − 6y − 636 39x − 2y − 154
117x − 6y − 636 −69x − 2y + 494 −66x + 6y + 258 .
39x − 2y − 154 −66x + − 6y + 258 30x − 6y − 114
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Implicitization in Bézier Form 203
where
x y 1
n n
lij (x, y) = wi wj xi yi 1
i j
xj yj 1
with n the degree of the curve, and xi , yi , wi the coordinates and weight of the ith control point.
For a general degree n curve, the implicit equation is
Ln−1,n−1 (x, y) · · · L0,n−1 (x, y)
f (x, y) = · · · · ·
Ln−1,0 (x, y) · · · L0,0 (x, y)
where X
Li,j = lkm .
m≤min(i,j)
k+m=i+j+1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
204 Implicitization in Bézier Form
For example, using the top and bottom rows of the matrix, we can compute two different inversion
equations:
l20 l10
t= , and t = . (17.11)
l20 − l21 l10 − l20
For the degree-three case, we have
t2
l32 (x, y) l31 (x, y) l30 (x, y)
l31 (x, y) l30 (x, y) + l21 (x, y) l20 (x, y) t(1 − t) =0 (17.12)
l30 (x, y) l20 (x, y) l10 (x, y) (1 − t)2
such that if we multiple the first row of the matrix in (17.12) by c1 and the second row by c2 and
add them to the third row, we obtain
t2
l32 (x, y) l31 (x, y) l30 (x, y)
l31 (x, y) l30 (x, y) + l21 (x, y) l20 (x, y) t(1 − t) =0 (17.13)
0 la (x, y) lb (x, y) (1 − t)2
where
la (x, y) = c1 l31 (x, y) + c2 [l30 (x, y) + l21 (x, y)] + l20 (x, y)
and
lb (x, y) = c1 l30 (x, y) + c2 l20 (x, y) + l10 (x, y).
The bottom row of (17.12.a) expresses the equation
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curve Inversion Using Linear Algebra 205
Example
Find an inversion equation for a polynomial Bézier curve with control points
Solution
x y 1 x y 1
l32 = 3 4 3 1 = 3x + 3y − 21,
l31 = 3 4 3 1 = 9x + 3y − 45,
5 2 1 5 0 1
x y 1 x y 1
l30 = 4 3 1 = 3x − 3y − 3,
l21 = 9 5 2 1 = 18x − 90,
1 0 1 5 0 1
x y 1 x y 1
l20 = 3 5 2 1 = 6x − 12y − 6, l10 = 3 5 0 1 = −12y.
1 0 1 1 0 1
1 0 1 1 0 1
5 0 1 5 2 1
4 3 1 4 3 1
c1 = = 2, c2 = − = −1
5 0 1 5 0 1
3 5 2 1 3 5 2 1
4 3 1 4 3 1
la (x, y) = c1 l31 (x, y) + c2 [l30 (x, y) + l21 (x, y)] + l20 (x, y) = 3x − 3y − 3
lb (x, y) = c1 l30 (x, y) + c2 l20 (x, y) + l10 (x, y) = −6y
So,
lb (x, y) −6y 2y
t= = = .
lb (x, y) − la (x, y) −3x − 3y + 3 x+y−1
Note that if we plug (1, 0) into the inversion equation, we obtain 0/0. That is because (1, 0) is a
double point on the curve, i.e., a point of self-intersection. There are actually two t values on the
curve that map to (1, 0): t = 0 and t = 2, as you can verify. At a double point, an inversion equation
will always give 0/0.
f (x, y)
t= (17.15)
g(x, y)
where f (x, y) and g(x, y) are polynomials of degree n − 2 if n > 2, and degree one if n = 2. Since
we are mainly interested in curves of degree two and three, f (x, y) and g(x, y) are just degree one
in those cases.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
206 Curve-Curve Intersections
Suppose we want to find the inversion equation for a rational cubic curve (in homogeneous form)
x(t) = x0 + x1 t + x2 t2 + x3 t3
y(t) = y0 + y1 t + y2 t2 + y3 t3
w(t) = w0 + w1 t + w2 t2 + w3 t3
Denote
f (x, y, w) = a2 x + b2 y + c2 w; g(x, y, w) = a1 x + b1 y + c1 w. (17.16)
To find an inversion equation for a cubic curve, we need just determine the coefficients a1 , a2 , b1 , b2 , c1 , c2
such that
f (x(t), y(t), w(t))
≡t (17.17)
g(x(t), y(t), w(t))
or
t · g(x(t), y(t), w(t)) − f (x(t), y(t), w(t)) ≡ 0 (17.18)
or
or
t4 [a1 x3 + b1 y3 + c1 w3 ]
+t3 [a1 x2 + b1 y2 + c1 w2 − a2 x3 − b2 y3 − c2 w3 ]
+t2 [a1 x1 + b1 y1 + c1 w1 − a2 x2 − b2 y2 − c2 w2 ]
1
+t [a1 x0 + b1 y0 + c1 w0 − a2 x1 − b2 y1 − c2 w1 ]
+ [a2 x0 + b2 y0 + c2 w0 ] ≡ 0. (17.19)
This equation will be identically equal to zero if and only if all of the coefficients of the power of t
are all zero. Thus, we can solve for the ai , bi , and ci from the set of linear equations:
a1 0
x3 y3 w3 0 0 0
x2 y2 w2 −x3 −y3 −w3 b1 0
c1 0
x1 y1 w1 −x2 −y2 −w2 = (17.20)
x0 y0 w0 −x1 −y1 −w1 a2 0
b2 0
0 0 0 −x0 −y0 −w0
c2 0
Of course, degree two curves are even more simple. Note that we can also find inversion equations
for 3D curves using this method.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curve-Curve Intersections 207
3 4
9
2 5 8
1 6 7
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
208 Surfaces
Intersection t1 Coordinates t2
Number Parameter of Point Parameter
of Curve 1 of Curve 2
1 0.0621 (4.2982,2.3787) 0.3489
2 0.1098 (4.4556,2.9718) 0.1330
3 0.1785 (4.6190,3.4127) 0.9389
4 0.3397 (4.9113,3.2894) 0.9219
5 0.4212 (4.9312,3.2186) 0.0889
6 0.6838 (5.1737,2.2902) 0.5339
7 0.8610 (5.4676,2.3212) 0.5944
8 0.9342 (5.6883,2.8773) 0.8463
9 0.9823 (5.9010,3.6148) 0.0369
The most common curve intersection algorithms are currently based on subdivision. Tests indicate
that this implicitization algorithm is faster than subdivision methods for curves of degree two and
three, and subdivision methods are faster for curves of degree five and greater [Sederberg et al ’86].
17.9 Surfaces
Implicitization and inversion algorithms exist for surfaces, also (see [Sederberg ’83] or [Sederberg et
al. ’84b]). But, whereas curve implicitization yields implicit equations of the same degree as the
parametric equations, surface implicitization experiences a degree explosion. A triangular surface
patch, whose parametric equations are of the form
i j i j
P P
i+j≤n xij s t i+j≤n yij s t
x = P i j
y = P i j
i+j≤n wij s t i+j≤n wij s t
zij si tj
P
i+j≤n
z = P i, j ≥ 0,
i+j≤n wij si tj
generally has an implicit equation of degree n2 . A tensor product surface patch, whose parametric
equations are of the form
Pn Pm i j
Pn Pm i j
i = 0 j = 0 xij s t i = 0 j = 0 yij s t
x = P n P m i j
y = P n P m i j
i = 0 j = 0 wij s t i = 0 j = 0 wij s t
Pn Pm i j
i = 0 j = 0 zij s t
z = Pn Pm i j
,
i = 0 j = 0 wij s t
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Base Points 209
generally has an implicit equation of degree 2mn. Thus, a bicubic patch generally has an implicit
equation f (x, y, z) = 0 of degree 18. Such an equation has 1330 terms!
Algebraic geometry shares important information on the nature of intersections of parametric
surfaces. Recall that Bezout’s theorem states that two surfaces of degree m and n respectively
intersect in a curve of degree mn. Thus, two bicubic patches generally intersect in a curve of degree
324.
We have noted that bilinear patches have an implicit equation of degree 2; quadratic patches
have an implicit equation of degree 4; biquadratic patches have an implicit equation of degree 8,
etc. It seems highly curious that there are gaps in this sequence of degrees. Are there no parametric
surfaces whose implicit equation is degree 3 or 5 for example? It turns out that parametric surfaces
of degree n only generally have implicit equations of degree n2 and that under certain conditions
that degree will decrease. To understand the nature of those conditions, we must understand why
the implicit equation of a parametric surface is generally n2 . The degree of a surface can be thought
of either as the degree of its implicit equation, or as the number of times it is intersected by a line.
Thus, the degree of the implicit equation of a parametric surface can be found by determining the
number of times it is intersected by a line. Consider a parametric surface given by
x(s, t) y(s, t) z(s, t)
x = y = z = ,
w(s, t) w(s, t) w(s, t)
where the polynomials are of degree n. One way we can compute the points at which a line intersects
the surface is by intersecting the surface with two planes which contain the line. If one plane is
Ax + By + Cz + Dw = 0, its intersection with the surface is a curve of degree n in s, t space:
Ax(s, t) + By(s, t) + Cz(s, t) + Dw(s, t) = 0. The second plane will also intersect the surface in
a degree n curve in parameter space. The points at which these two section curves intersect will be
the points at which the line intersects the surface. According the Bezout’s theorem, two curves of
degree n intersect in n2 points. Thus, the surface is generally of degree n2 .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
210 Ideals and Varieties
ik ∈ B, k = 1, . . . , n and jk ∈ A, k = 1, . . . , m.
is the ideal generated by {f1 (t), f2 (t), . . . fn (t)} and is defined as the infinite set of polynomials in t
that can be created as f1 (t)g1 (t) + f2 (t)g2 (t) + . . . + fn (t)gn (t) where the gi (t) are any polynomials in
t with real coefficients. All ideals of polynomials in one variable are principle ideals, and the single
generator is the GCD of all polynomials in the ideal.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Ideals and Varieties 211
k[x1 , . . . , xn ] signifies the set of all polynomials in the variables x1 , . . . , xn whose coefficients
belong to a field k. For example, R[x, y] is the set of all polynomials
X
ci xe1,i y e2,i (17.22)
where ci ∈ R and e1,i , e2,i ∈ {0, 1, 2, . . .}. Thus, “f ∈ R[x, y, z]” means that f is a polynomial whose
variables are x, y and z and whose coefficients are real numbers. All polynomials in this chapter
have coefficients that are real numbers.
Term order
It is often useful to list the terms of a polynomial in decreasing order, beginning with the leading
term. This is done using a term order — a way to compare any two distinct terms of a polynomial
and declare which is “greater. ”
For linear polynomials, term order amounts to merely declaring an order on the variables. For
example, the terms of the polynomial
2x + 3y − 4z
are in proper order if we declare x > y > z. If we declare y > z > x, the proper order would be
3y − 4z + 2x. For non-linear polynomials, we begin by declaring an order on the variables, and
then we must also choose one of several schemes that decide how the exponents in a polynomial
influence term order. One such scheme is called lexicographical order (nicknamed lex), defined as
follows. If the variables of a polynomial are ordered x1 > x2 > . . . > xn , then given two distinct
e e e e e e
terms Ti = ci x11,i x22,i · · · xnn,i and Tj cj x11,j x22,j · · · xnn,j , Ti > Tj if
1. e1,i > e1,j , or if
2. e1,i = e1,j and e2,i > e2,j , or, in general, if
3. ek,i = ek,j for k = 1, . . . , m − 1 and em,i > em,j .
For example, the polynomial
3x2 y 2 z + 4xy 3 z 2 + 5x3 z + 6y 2 + 7xz 3 + 8
using lex with x > y > z would be written 5x3 z + 3x2 y 2 z + 4xy 3 z 2 + 7xz 3 + 6y 2 + 8 and its leading
term is 5x3 z. Using lex with z > x > y it would be written 7z 3 x + 4z 2 xy 3 + 5zx3 + 3zx2 y 2 + 6y 2 + 8
and the leading term would be 7z 3 x. Or using lex with y > z > x would be written 4y 3 z 2 x +
3y 2 zx2 + 6y 2 + 7z 3 x + 5zx3 + 8 and the leading term would be 4y 3 z 2 x.
Another choice for term order is the degree lexicographical order (abbreviated deglex). If the
variables are ordered x1 > x2 > . . . > xn , then using deglex, Ti > Tj if
1. e1,i + e2,i + . . . + en,i > e1,j + e2,j + . . . + en,j , or
2. e1,i + e2,i + . . . + en,i = e1,j + e2,j + . . . + en,j and Ti > Tj with respect to lex.
Using deglex with x > y > z, the terms of 3x2 y 2 z + 4xy 3 z 2 + 5x3 z + 6y 2 + 7xz 3 + 8 would be ordered
4xy 3 z 2 + 3x2 y 2 z + 5x3 z + 7xz 3 + 6y 2 + 8.
As obverved in the lex and deglex examples, term orders ignore the coefficient of a term, so a
term order might more properly be called a monomial order.
Other term orders can also be defined, such as degree reverse lexicographical order. The precise
requirements for any term order are discussed in reference [AL94], page 18.
The n-dimensional real affine space is denoted Rn and is the set of n-tuples:
Rn = (a1 , . . . , an ) : a1 , . . . , ak ∈ R (17.23)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
212 Ideals and Varieties
The polynomials f1 , ..., fs are called generators of this ideal. As in integer ideals, any polynomial
ideal can be defined using different generating sets.
Consider a set of polynomials f1 , f2 , · · · , fs ∈ k[x1 , ..., xn ]. Let (a1 , ..., an ) be a point in k n
satisfying fi (a1 , ..., an ) = 0, i = 1, ..., s. The set of all such points (a1 , ..., an ) is called the variety
defined by f1 , ..., fs , and is denoted by V (f1 , ..., fs ):
A more familiar way to refer to a variety is simply the set of solutions to a set of polynomial
equations.
A variety defined by a single polynomial—called a hypersurface—is the most familiar instance of a
variety. A hypersurface in R2 is a planar curve defined using an implicit equation, and a hypersurface
in R3 is what is normally called an implicit surface in CAGD. For example, V (x2 + y 2 − 1) is a
circle defined in terms of the implicit equation x2 + y 2 − 1 = 0 and V (2x + 4y − z + 1) is the plane
whose implicit equation is 2x + 4y − z + 1 = 0. A variety V (f1 , . . . , fs ) defined by more than one
polynomial (s > 1) is the intersection of the varieties V (f1 ) . . . V (fs ).
An ideal is a set of polynomials that is infinite in number. The variety of an ideal is the set of all
points (a1 , ..., an ) that make each polynomial in the ideal vanish. It is easy to see that the variety of
an ideal is the variety of generating set for the ideal. Two generating sets for the same ideal define
the same variety.
This is a very powerful concept, because some generating sets are more useful than others. For
example, consider the ideal
I = hx + y + z − 6, x − y − z, x − 2y + z − 3i
which can also be generated by hx − 3, y − 1, z − 2i. This second set of generators is much more
helpful, because we can immediately see that V (I) is x = 3, y = 1, z = 2. One method for converting
the generating set hx + y + z − 6, x − y − z, x − 2y + z − 3i into hx − 3, y − 1, z − 2i is to use the
familiar Gauss elimination method.
As another example, consider the ideal
An alternative generator for this ideal is simply ht − 1i, which can be obtained using Euclid’s
algorithm. Thus, t = 1 is the variety of this ideal, or, the common zero.
As we saw in our discussion of ideals of integers, necessary and sufficient conditions for hf1 , . . . , fn i =
hg1 , . . . , gm i are f1 , . . . , fn ∈ {g1 , . . . , gm } and g1 , . . . , gm ∈ {f1 , . . . , fn }. This general process can
be used to prove that Gauss elimination and Euclid’s algorithm, respectively, are algorithms that
create equivalent generating sets for ideals.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Ideals and Varieties 213
special cases of a completely general method for robustly finding all solutions to a set of polynomial
equations in any number of variables. This method is based on the notion of Gröbner bases.
A Gröbner basis of an ideal I is a set of polynomials {g1 , . . . , gt } such that the leading term of any
polynomial in I is divisible by the leading term of at least one of the polynomials g1 , . . . , gt . This, of
course, requires that a term order be fixed for determining the leading terms: different term orders
produce different Gröbner bases. Several excellent books have been written on Gröbner bases that
do not presuppose that the reader has an advanced degree in mathematics [CLO92, AL94, BW93]
A Gröbner basis is a particularly attractive set of generators for an ideal, as illustrated by two
familiar examples. If {f1 , . . . , fs } are polynomials in one variable, the Gröbner basis of hf1 , . . . , fn i
consists of a single polynomial: the GCD of f1 , . . . , fs . If {f1 , . . . , fs } are linear polynomials in several
variables, the Gröbner basis is an uppertriangular form of a set of linear equations. The Gröbner
basis of these special cases provides significant computational advantage and greater insight, and
the same is true of the Gröbner basis of a more general ideal.
Gröbner bases are the fruit of Bruno Buchberger’s Ph.D. thesis [Buc65], and are named in
honor of his thesis advisor. Buchberger devised an algorithm for computing Gröbner bases [Buc85,
CLO92]. Also, commercial software packages such as Maple and Mathematica include capabilities
for computing Gröbner bases.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
214 Ideals and Varieties
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 18
This chapter presents a new way of looking at implicitization that has some geometric meaning. It
also shows how to express the determinant in more compact form, how to locate the double point
of a Béziercurve, and discusses the concept of duality.
18.1 Definition
A pencil of lines can be described by the equation
215
216 Definition
t=1 L
10 L01 t=0
0.75 0.25
0.5
0.5
0.25
0.75
t=0
L00 t=1
L11
In this chapter, all single characters in bold typeface signify a triple. In particular, the symbol
P denotes the triple (X, Y, W ), and L symbolizes the triple (a, b, c). When we refer to “the line L”,
we mean
{(X, Y, W )|L · P = (a, b, c) · (X, Y, W ) = aX + bY + cW = 0}. (18.5)
Thus, we can say that a point P lies on a line L = (a, b, c) if and only if P · L = 0.
The cross product has the following two applications: The line L containing two points P1 =
(X1 , Y1 , W1 ) and P2 = (X2 , Y2 , W2 ) is given by
L = P1 × P2 . (18.6)
The point P at which two lines L1 = (a1 , b1 , c1 ) and L2 = (a2 , b2 , c2 ) intersect is given by
P = L1 × L2 . (18.7)
This illustrates the principle of duality. Loosely speaking, general statements involving points and
lines can be expressed in a reciprocal way. For example, the statement “a unique line passes through
two distinct points” has a dual expression, “a unique point lies at the intersection of two distinct
lines”.
In general, any triple (α, β, γ) can be interpreted as a line ({(X, Y, W )| = αX + βY + γW = 0})
or as a point (whose Cartesian coordinates are ( αγ , βγ )). To remove the ambiguity, triples which are
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Definition 217
P
1/d
d
Line(!,",#)
to be interpreted as points are preceded by the prefix ‘Point’ (i.e. Point(α, β, γ)), and triples which
signify lines are preceded by ‘Line’. The dual of Line(α, β, γ) is Point(α, β, γ), and vice versa. Dual
points and lines are related geometrically as follows:
γ
• If d = √ is the distance from Line(α, β, γ) to the origin, then 1/d is the distance from
α2 +β 2
Point(α, β, γ) to the origin.
• The line from the origin to Point(α, β, γ) is perpendicular to Line(α, β, γ).
This relationship is illustrated in Figure 18.2.
Discussion of the duals of Bézier and B-spline curves can be found in [Hos83, Sab87].
n
with Bin [t] = i (1 − t)n−i ti , then equation (18.8) defines a rational Bézier curve
n
X
P[t] = Pi Bin [t] (18.11)
i=0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
218 Pencils and Quadratic Curves
with homogeneous control points Pi = (Xi , Yi , Wi ). Customarily, these control points are thought of
X i Yi
as having Cartesian coordinates ( W , ) with weights Wi . If W [t] ≡ γ, that is, if W [t] is a constant,
i Wi
then the curve is referred to as a polynomial curve. This happens if W0 = W1 = . . . = Wn = γ.
In this chapter, the word curve generally means rational curve unless it is referred to as polynomial
curve.
Likewise,
L[t] = (a[t], b[t], c[t]) (18.12)
denotes the family of lines
a[t]x + b[t]y + c[t] = 0. (18.13)
Such a family of lines is traditionally known as a pencil of lines if a[t], b[t], and c[t] are linear functions
of t. In the general case, [Win23] refers to families of lines as line equations, and families of points
(i.e., curves) as point equations. In this chapter, it is more comfortable to refer to a parametric
family of lines as in equation (18.12) as a moving line. Also, a curve P[t] will be referred to as a
moving point when the varying position of point P[t] is of interest.
A moving point P[t] follows a moving line L[t] (or, equivalently, the moving line follows the
moving point) if
P[t] · L[t] ≡ 0, (18.14)
that is, if point P[t] lies on line L[t] for all values of t. Two moving points P1 [t] and P2 [t] follow a
moving line L[t] if
P1 [t] × P2 [t] ≡ L[t]k[t] (18.15)
where k[t] is a scalar rational function of degree zero or greater. Two moving lines L1 [t] and L2 [t]
intersect at a moving point P[t] if
L[t] = L0 (1 − t) + L1 t. (18.17)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Pencils and Quadratic Curves 219
L1
t=1
P1
0.75
d1 0.5
0.25
P0 L0
A t=0
d0 Parameter Lin
All lines in the pencil contain the point at which L0 and L1 intersect. We will refer to this point
as the pencil axis. There is a one-to-one correspondence between lines in the pencil and parameter
values t.
The rate at which the moving line L[t] rotates about its axis as t varies is most easily visualized
by introducing a parameter line as shown in Figure 18.3. The parameter line is a degree 1 polynomial
Bézier curve
P[t] = (1 − t)P0 + tP (18.18)
which follows L[t]. P0 lies on L0 a distance d0 from the axis, and P1 lies on L1 a distance d1 from
the axis where p
d0 a2 + b20
= p 02 . (18.19)
d1 a1 + b21
If L[t] is to rotate counter clockwise as t increases, then
a0 b1 > a1 b0 . (18.20)
If parameter values are marked off evenly along the parameter line as shown, the line L[t] passes
through the parameter line at the point corresponding to t.
Notice that d0 and d1 control the rate at which L[t] rotates. Figure 18.4 shows an example
in which d0 is larger than d1 , with the effect that lines defined by evenly spaced increments are
concentrated near L0 .
An alternate way to specify a pencil of lines is with an axis PA = (XA , YA , WA ) and a rational
linear Bézier curve
A pencil L[t] can then be defined as the set of lines connecting PA with points on P[t]:
This representation of a pencil is related to the representation in equation (18.17). The two lines
L0 and L1 can be expressed
L0 = PA × P0
L1 = PA × P1 (18.23)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
220 Pencils and Quadratic Curves
L1
t=1 0.9
0.8
0.7
0.6
0.5
0.4
d1 0.3
0.2
0.1 L0
t=0
A
d0 Parameter Line
and the parameter line is positioned with distances d0 and d1 which satisfy
d0 PA P0 W0
= , (18.24)
d1 PA P1 W1
as shown in Figure 18.5. Thus, we see that every pencil of lines follows a degree one polynomial
curve.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Pencils and Quadratic Curves 221
L1
t=1
0.9
0.8
W1=2
d1 0.7
P1
0.6
0.5
.5d1 0.4
0.3
A 0.2
0.1 t=0 L0
d0 P0
W0=1
Parameter Line
L00
L10
0.25 t=0
0.75 0.5
t=1
t=0
0.25
L01 0.5
0.75
t=1
L11
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
222 Pencils and Quadratic Curves
L10
!0 L00
P0
L01
Pb
P1
!1
Pa
P2 L11
The geometric relation between the control points and weights are shown in Figure 18.7. Control
point
q P0 lies at the intersection of L00 and L10 and has a weight of d00 d10 sin(θ0 ), where dij =
a2ij + b2ij . Control point P2 lies at the intersection of L01 and L11 and has a weight of d01 d11 sin(θ1 ).
Control point P1 and its weight is computed using the auxiliary points Pa and Pb which are the
intersection of L00 and L11 , and L01 and L10 , respectively.
The two pencils of lines provide a useful intermediate representation of a conic section, from
which the implicit equation and parametric equations can be derived with equal ease. The implicit
equation can be found by eliminating the pencil parameter t from the two pencil equations
L00 (1 − t) + L10 t = 0
L10 (1 − t) + L11 t = 0 (18.28)
where
Lij = Lij · P = aij X + bij Y + cij W. (18.29)
In matrix form,
L00 L01 1−t
=0 (18.30)
L10 L11 t
from which the implicit equation of the intersection locus is
can be represented as the intersection of two pencils. Consider a moving line L[t] which goes
through a certain fixed point P[k] on the curve and follows the moving point P[t]. This moving line
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Pencils and Quadratic Curves 223
Pa Pb
t=0 t=1 2d
2) 0.1 0.9 12
w1/w 0.2 0.8 (w
( 1/w
01 P1 0.3 0.7 P1
2d 0.4 0.6 0)
1 0.5 0.5 d1
d0 0.6 0.4 2
0.7 0.3
0.8 0.2
0.9 0.1
P0 Pt=1
2
t=0
P0 P2
is expressed as follows.
from which this L[t] is always equivalent to a linear moving line (i.e. a pencil). Thus, two pencils
can be found by choosing arbitrary two parameter values k0 and k1 and calculating P[ki ] × P[t].
The simplest example is k0 = 0, k1 = 1. In this case,
from which the two pencils intersecting at the moving point P[t] are
L0 = P0 × (2P1 (1 − t) + P2 t)
L1 = P2 × (P0 (1 − t) + 2P1 t). (18.35)
Figure 18.8 shows the geometric relationship. The parameter lines of pencils L0 [t] and L1 [t] are
Pa P2 and P0 Pb , respectively, where
2w1
P0 Pa = P0 P1 ,
w2
2w1
P2 Pb = P2 P1 . (18.36)
w0
These parameter lines have the property of a nomogram. Consider a point Pp on the curve. If
the line P0 Pp intersects the parameter line Pa P2 at the point Pq , then the parameter value t at
Pp can be found as
Pa Pq
t= . (18.37)
Pa P2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
224 Moving Lines
Since this is the dual of a Bézier curve, it has many nice properties. For example, L[t] moves from
L0 to Ln when t is changing from 0 to 1. The line L[τ ] for any parameter value τ can be calculated
using the de Casteljau algorithm. Denote
L<k>
i [τ ] = (1 − τ )L<k−1>
i [τ ] + τ L<k−1>
i+1 [τ ] (18.39)
where
L<0>
i [τ ] = Li . (18.40)
Then, L<n>
0 [τ ]
is the required line L[τ ]. This algorithm also subdivides the moving line in the same
way as for a Bézier curve.
then the control lines Lk of the moving line are expressed as follows:
m+n
X
L[t] = Bkm+n [t]Lk (18.43)
k=0
1 X m n
Lk = Pi × Qj . (18.44)
m+n i j
i+j=k
k
For example, if a moving line L[t] follows a degree one moving point
P[t] = P0 (1 − t) + P1 t (18.45)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Moving Lines 225
Q0
L0
P0 Q1
L1
L2 P1 L
3
Q2
Figure 18.9: Cubic Moving Line which Follow Linear and Quadratic Moving Points
L0 = P0 × Q0
1
L1 = (2P0 × Q1 + P1 × Q0 )
3
1
L2 = (P0 × Q2 + 2P1 × Q1 ) (18.47)
3
L3 = P1 × Q2 .
The relationship between the control lines and the control points is shown in Figure 18.9.
whose degree is generally m + n. This is the dual of what we discussed in section 18.3.2. Therefore,
the relationship between the control lines of L0 [t] and L1 [t] and the control points of P[t] is
1 X m n
Pk = L0i × L1j . (18.49)
m+n i j
i+j=k
k
Figure 18.10 shows an example of cubic moving point P[t] which is the intersection of a pencil
L0 [t] and a quadratic moving line L1 [t]. Notice that each control point of P[t] can be calculated
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
226 Moving Lines
L10
L00 P0
L11
L01 P1
P2 L12
P3
P0 = L00 × L10
1
P1 = (2L00 × L11 + L01 × L10 )
3
1
P2 = (L00 × L12 + 2L01 × L11 ) (18.50)
3
P3 = L01 × L12 .
In equation (18.41), assume P and Q have no base points themselves. Then, the degree of L[t]
is generally m + n. The degree will be less than m + n only if L has a base point. This can only
happen if there exists a value τ such that P[τ ] × Q[τ ] = (0, 0, 0), which can only happen if at one of
the m × n points at which P and Q intersect, both curves have the same parameter value τ . Thus,
the degree of L is m + n − r where r is the number of base points. The same thing happens in
equation (18.48).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curve Representation with Two Moving Lines 227
where PA is the axis and a P[t] is a degree n curve. An axial moving line can be thought of as
following a degree 0 moving point (i.e. a fixed point) and a degree n moving point (i.e. curve). The
relationship between the control lines of the axial moving line and the control points of the curve is
Li = PA × Pi . (18.53)
Notice that all the control lines Li of the axial pencil go through the axis.
Though the degree of this moving line is generally n, it can always be reduced to degree n − 1 if the
axis lies on the curve
PA = P[τ ], (18.55)
because then the moving line has a base point.
We have already confirmed this fact for quadratic Bézier curves in section 18.2.2. For cubic
Béziers,
where
X n n
Li,j = Pl × Pm (18.58)
l m
l+m=i+j+1
Notice that the determinant of the n × n matrix is equivalent to the Bezout’s resultant which gives
the implicit equation of the curve.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
228 Curve Representation with Two Moving Lines
P2=(1,2,1)
P1=(0,1,1)
P0=(0,0,1)
P3=(3,0,1)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curve Representation with Two Moving Lines 229
Since this moving line follows the moving point P[t] for any τ , the following equation is obtained
(1 − t)2
(−3, 0, 0) (−6, 3, 0) (0, 3, 0) 0
(−6, 3, 0) (−9, 12, −9) (3, 9, −9) (1 − t)t · P[t] = 0 . (18.62)
(0, 3, 0) (3, 9, −9) (6, 6, −18) t2 0
In this equation, each row of the matrix is a quadratic moving line that follows the moving point,
and any linear combination of these three moving line also follow the moving point. Thus we can
make linear operations between the three rows. Since the left most three elements of the matrix
shows three lines which intersect at the same point P0 , we can zero out the bottom left corner of
the matrix
(1 − t)2
(−3, 0, 0) (−6, 3, 0) (0, 3, 0) 0
(−6, 3, 0) (−9, 12, −9) (3, 9, −9) (1 − t)t · P[t] = 0 . (18.63)
(0, 0, 0) (0, 3, 0) (3, 3, −9) t2 0
Now the bottom moving line has a base point at t = 0 and it is reducible to a linear moving line
1−t 0
(0, 3, 0) (3, 3, −9) · P[t] = . (18.64)
t 0
As a result, this pencil and one of the three quadratic moving lines are the required two moving
lines
Notice that the axis of the pencil always lies at the double point of the cubic curve. It can be
calculated from the two control lines. In this example,
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
230 Curve Representation with Two Moving Lines
P2=(1,2,1)
P3=(3,2,1)
P1=(0,1,1)
P0=(0,0,1)
P4=(2,0,1)
In this 4 × 4 matrix, the left most elements of the bottom two rows can be eliminated by applying
row operations
(1 − t)3
(−4, 0, 0) (−12, 6, 0) (−8, 12, 0) (0, 3, 0)
0
(−12, 6, 0) (−32, 36, −24) (−16, 50, −48) (3, 9, −9) (1 − t)2 t
0
(0, 0, 0)
2 · P[t] = ,
(0, 2, 0) (4, 4, −8) (4, −2, −8) (1 − t)t
0
3
(0, 0, 0) (8, 6, 0) (28, 4, −24) (20, −14, −40) t 0
(18.68)
from which we can obtain two quadratic moving lines
(1 − t)2
(0, 2, 0) (4, 4, −8) (4, −2, −8) 0
(1 − t)t · P[t] = (18.69)
(8, 6, 0) (28, 4, −24) (20, −14, −40) 0
t2
that follow the curve, and hence which intersect at the curve.
Any linear combination of these two quadratic moving lines is also a quadratic moving line that
follows the curve. If the moving line is axial, then the axis is a double point. Any rational quartic
curve has three double points, which may possibly coalesce to form one triple point. In the case of
three distinct double points, their locations can be obtained by following method. Let LQ [t] be a
linear combination of the two moving lines:
(1 − t)2
(0, 2, 0) (4, 4, −8) (4, −2, −8)
LQ [t] = 1−τ τ (1 − t)t (18.70)
(8, 6, 0) (28, 4, −24) (20, −14, −40)
t2
= (8τ, 4τ + 2, 0)(1 − t)2 + (24τ + 4, 4, −16τ − 8)(1 − t)t + (16τ + 4, −12τ − 2, −32τ (18.71)
− 8)t2 .
If it is axial, three control lines must intersect at one point. This condition is expressed with the
following equation
(8τ, 4τ + 2, 0) × (24τ + 4, 4, −16τ − 8) · (16τ + 4, −12τ − 2, −32τ − 8) = 0 (18.72)
32τ 3 − 32τ 2 − 8τ = 0
√
1± 2
τ = 0, .
2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curve Representation with Two Moving Lines 231
P2=(1,2,1)
P3=(3,2,1)
P1=(0,1,1)
P0=(0,0,1)
P4=(3,-2,1)
−1(2, 0, 1) (τ = 0) √
(8τ, 4τ + 2, 0) × (24τ + 4, 4, −16τ − 8) = √ √ (18.73)
(−12 ∓ 8 2)(1, ∓ 2, 1) (τ = 1±2 2 ),
√
from which the double points are (2, 0) and (1, ± 2).
If there is a triple point on the curve, however, there is no pair of quadratic moving lines that
can represent the curve. Figure 18.13 is an example quartic Bézier curve with a triple point at P4 .
We can obtain four cubic moving lines that follow the curve
3
(−4, 0, 0) (−12, 6, 0) (−8, 12, 0) (2, 3, 0) (1 − t)2
0
(−12, 6, 0) (−32, 36, −24) (−14, 51, −48) (12, 12, −12)
(1 − t) t
0
(−8, 12, 0) (−14, 51, −48) (12, 60, −108) (24, 12, −48) (1 − t)t2 · P[t] = ,
0
(2, 3, 0) (12, 12, −12) (24, 12, −48) (16, 0, −48) t3 0
(18.74)
form which we can get two quadratic moving lines
(1 − t)2 0
(2, 3, 0) (8, 6, −12) (8, 0, −24)
(1 − t)t · P[t] = 0 . (18.75)
(8, 12, 0) (30, 21, −48) (28, 0, −84)
t2 0
These two quadratic moving lines (call them L1 and L2 ) are linearly independent, but their inter-
section does not express the curve because all control points obtained from L1 × L2 are (0, 0, 0).
This means that both moving lines have exactly the same rotation, but their weights are different.
In fact, each of them has a base point and both are identical to the same pencil. The pencil can be
obtained by eliminating the bottom left element
2
(1 − t) 0
(0, 0, 0) (2, 3, 0) (−4, 0, 12) (1 − t)t · P[t] = 0 . (18.76)
t2 0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
232 Curve Representation with Two Moving Lines
As a result, the curve can be expressed as the intersection of this pencil and one of the cubic moving
lines. The axis of the pencil is
where
X n n
Li,j = Pl × Pm . (18.79)
l m
l+m=i+j+1
By calculating linear combinations of these rows of the n × n matrix, we can always zero out all but
two elements in the left-most column, since all such elements are lines which pass through the point
P0 :
L0,0 L0,1 ... L0,n−1 n−1
0
(1 − t)
L1,0 L1,1 ... L1,n−1
n−2
0
(1 − t) t
<1> <1>
0 L 2,1 ... L 2,n−1
· P[t] = 0 . (18.80)
:
:
: ::: : :
tn−1
0 L<1> <1>
n−1,1 ... Ln−1,n−1 0
L<k>
i,j denotes the element after k-th calculation. Now, we have n − 2 moving lines whose degree is
n−1 :
<1>
L<1> L<1>
L2,1 2,2 ... 2,n−1 (1 − t)n−2 0
L<1> <1> <1>
n−3
L ... L (1 − t) t 0
3,1 3,2 3,n−1 · P[t] = . (18.81)
: : ::: :
:
:
L<1> L<1>
... L<1>
t n−2
0
n−1,1 n−1,2 n−1,n−1
In this (n − 2) × (n − 1) matrix, it turns out that we can again zero out all but two elements of
the left-most column, since magically, all lines L<1>
i,1 contain the point P0 . This can be seen by
evaluating the set of equations (18.81) at t = 0:
<1>
L2,1
0
L<1>
0
3,1
· P[0] = . (18.82)
: :
<1>
Ln−1,1 0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Curve Representation with Two Moving Lines 233
This zeroing out process can be repeated until one or two rows remain.
If the degree is n = 2m, we can repeat the element zeroing process m − 1 times and obtain two
degree m moving lines
<m−1> (1 − t)m
Ln−2,m−1 L<m−1> ... L<m−1>
(1 − t)m−1 t
0
n−2,m n−2,n−1
· P[t] = . (18.83)
L<m−1> <m−1>
n−1,m−1 Ln−1,m
<m−1>
... Ln−1,n−1
:
0
tm
If the degree is n = 2m + 1, we can repeat the zero out process m times. In this case, only one
element can be eliminated in the last step, and thus, the bottom two rows express degree m + 1 and
degree m moving lines
<m−1> (1 − t)m+1
Ln−2,m−1 L<m−1> ... L<m−1>
(1 − t)m t
0
n−2,m n−2,n−1
· P[t] = . (18.84)
0 L<m>
n−1,m ... L<m>
n−1,n−1
:
0
tm+1
If there is a triple or higher order multiple point, however, the bottom two moving lines may be
reducible. In such case, a lower degree moving line can be obtained as discussed in section 18.4.4.
18.4.6 Implicitization
Conventionally, the implicit equation of a rational Bézier curve is calculated as the determinant of
the n × n matrix in equation (18.78) [SAG84], which is called Bezout’s resultant. It is also possible
to implicitize using a pair of moving lines. An arbitrary point P = (x, y, 1) lies on the curve P[t] if
and only if it lies on both moving lines in equation (18.83) (or (18.84)):
<m−1> (1 − t)m
Ln−2,m−1 · P L<m−1> <m−1>
(1 − t)m−1 t
n−2,m · P ... Ln−2,n−1 · P 0
= . (18.85)
L<m−1> <m−1> <m−1>
n−1,m−1 · P Ln−1,m · P ... Ln−1,n−1 · P
:
0
tm
This is equivalent to saying that, if P = (x, y, 1) lies on the curve, then there exists a value of t
which satisfies both equations (18.85), which means that the resultant of the two equations is zero.
Let us calculate the implicit equation of the quartic curve in Figure 18.12. By calculating the
dot product with P for each element, equation (18.69) is expressed as follows
(1 − t)2
2y 4x + 4y − 8 4x − 2y − 8 0
(1 − t)t = . (18.86)
8x + 6y 28x + 4y − 24 20x − 14y − 40 0
t2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
234 Tangent Moving Lines
This method is generally faster than the conventional method. In most cases, the resultant of the
two moving lines ends up in a ( n2 )×( n2 ) determinant, while you must calculate the n×n determinant
in conventional method.
Thus, "m−1 #
X m−1
X
0
P[t] × P [t] = m Bim−1 [t]Pi × Bim−1 [t]Pi+1 . (18.95)
i=0 i=0
Any non-axial moving line L[t] can be represented as the set of lines which are tangent to a given
parametric curve — its envelope curve. The envelope curve is given by the equation
Point(L[t] × L0 [t]) (18.96)
where L0 [t] = (a0 [t], b0 [t], c0 [t]) [Win23], p. 244. Thus, L[τ ] contains Point(L[τ ] × L0 [τ ]) and is
tangent to its envelope curve at that point. Figure 18.14 shows an example of a cubic moving line
and its envelope curve. Notice that equations (18.88) and (18.96) are the dual of each other. The
degree of L[t] × L0 [t] is at most 2m − 2 if L[t] is a degree m moving line. The control points can be
calculated using the dual of equation (18.95).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Tangent Moving Lines 235
L2
L1
L0 L3
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
236 Tangent Moving Lines
Line(B(!))
Line(A(!)) Point(A(!))
(0,0)
Point(B(!))
By eliminating δ from equations (18.99) and (18.100), we can obtain equation (18.98).
Given A[t], Point(A[τ ]) is the dual of Line(A[τ ]) for every value of τ , as defined in Figure 18.2.
Thus, we say that the moving point Point(A[t]) is dual with the moving line Line(A[t]). Consider
a second moving point Point(B[t]) and its dual moving line Line(B[t]). If
where k1 [t] is a rational function, then there also exists a rational function k2 [t] such that
When this relationship exists, Point(A[t]) and Point(B[t]) are referred to as reciprocal curves [Sal34],
p.54. The rational functions are related
1
k2 [t] =
k12 [t]A[t] × A0 [t] · A00 [t]
1
k1 [t] = 2 (18.103)
k2 [t]B[t] × B0 [t] · B00 [t]
The geometric relationship between two reciprocal curves is shown in Figure 18.15. For any
value of t = τ , Point(A[τ ]) has a dual Line(A[τ ]) which is tangent to the curve Point(B[t]) at
Point(B[τ ]). Likewise, Point(B[τ ]) has a dual Line(B[τ ]) which is tangent to the curve Point(A[t])
at Point(A[τ ]). If Point(A[τ ]) happens to be a cusp, then Point(B[τ ]) is an inflection point, and vice
versa (see Figure 18.16). If Point(A[τ ]) = Point(A[β]) (that is, if there exists a self intersection or
crunode), then Point(B[τ ]) and Point(B[β]) have the same tangent line (known as a double tangent).
This is illustrated in Figure 18.17.
Table 18.1 summarizes the correspondences between a pair of reciprocal curves. The degree of a
curve can be defined as the number of times (properly counting real, complex, infinite, and tangent
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Tangent Moving Lines 237
Line(A(!))
(0,0)
Point(B(!))
Point(A(!))
Line(B(!))
Line(B("))
Point(A(!))=Point(A("))
(0,0)
Point(B(!))
Line(A(!))=Line(A("))
Point(B("))
Line(B(!))
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
238 Tangent Moving Lines
curve 1 curve 2
degree class
class degree
double point double tangent
double tangent double point
cusp inflection point
inflection point cusp
intersections) any line intersects the curve. The class of a curve is the number of lines passing
through a given point which are tangent to the curve.
Tangent moving lines and reciprocal curves provide a powerful tool for analyzing the singularities
of rational curves. For example, you can obtain the inflection points of a curve by finding the cusps
of its reciprocal curve. The lines tangent to a curve at two distinct real points are found as the
crunodes of the reciprocal curve. Equation (18.95) provides an easy way to compute reciprocal
curves in Bernstein form.
LT i = Line(ai , bi , ci ) (i = 0, 1, . . . , 2n − 2) (18.104)
then this moving line LH [t] has an axis at the origin. Notice that LH [t] follows the degree 2n − 2
polynomial curve
2n−2
X
PH [t] = PHi (18.107)
i=0
PHi = Point(bi , −ai , 1), (18.108)
because
Point(0, 0, 1) × Point(bi , −ai , 1) = Line(ai , bi , 0). (18.109)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Tangent Moving Lines 239
Since two moving lines LT [t] and LH [t] has the same direction at any t, LH [t] gives the tangent
direction of the curve P[t]. Thus, the curve PH [t] is a scaled hodograph of P[t].
This method is available for any rational curve P[t], however, the magnitude of the derivative is
not correct except for polynomial curves.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
240 Tangent Moving Lines
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 19
(x2 + y 2 − 1)(x2 + y 2 − 4)
which is two concentric circles. This leads to another characteristic of rational curves - you can
sketch an entire rational curve without removing your pencil from the paper (with the possible
exception of a finite number of acnodes). For this reason, the classical algebraic geometry literature
sometimes refers to rational curves as “unicursal” curves.
It should also be noted that an algebraic curve which consists of more than one component is not
necessarily reducible. For example, many non-rational cubic curves consist of an oval and a branch
which does not touch the oval, and yet the equation does not factor.
241
242 Detecting Double Points
x3 − 2xy 2 + xy + 3y 2 = 0.
To determine how many times a general line through the origin hits this curve, we define such a line
parametrically so that the point t = 0 on the line corresponds to the origin:
x = at, y = bt.
Since this equation has at least a double root at t = 0 for any values of a and b (which control the
slope of the line), we conclude that the curve has a double point at the origin.
There are basically three types of double points: the crunode (or simply node, or self intersection),
the cusp, and the acnode (or isolated node). An example of a cubic curve with a crunode at the
origin is the curve in Figure 19.2 whose implicit equation is
x3 + 9x2 − 12y 2 = 0.
You can verify by implicitization that this curve can be expressed as a Bézier curve with control
points (3, 3), (−13, −15), (−13, 15), (3, −3).
An example of a cubic curve with a cusp at the origin is given by
x3 − 3y 2 = 0
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Detecting Double Points 243
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
244 Implicit Curve Intersections
x3 − 3x2 − 3y 2 = 0.
We can classify a double point as being a crunode, acnode or cusp by examining the tangent
lines to the curve at the double point. A crunode has two distinct real tangent lines, a cusp has
two identical tangent lines, and an acnode has two complex tangent lines. A tangent line through a
double point hits the curve three times at the double point. We can find the slope of the tangent
lines by computing values of a and b for which the intersection of the line and the curve has a triple
root at t = 0. In the previous example, this occurs if ab + 3b2 = 0 from which a = 1, b = 0 and
a = −3, b = 1 are the two independent solutions. These represent two real, distinct lines, so the
double point in a crunode.
The exercise that we just performed only lets us verify that a given point is singular (a singular
point is a double point, triple point, or multiple point in general). To determine the location of
singular points, we can use a tool known as the discriminant (discussed later).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Discriminants 245
(5/3, 4/3)
(-5/4, 3/4)
13/12, 5/12)
(1, 0)
The x-resultant of these two implicit equations is 144y 4 − 360y 3 + 269y 2 − 60y whose roots
are y = 0, y = 4/3, y = 3/4, and y = 5/12. These are the y-coordinates of the points of intersection
of the two curves.
We can use the y-resultant to find the x-coordinates of the points of intersection. The y-resultant
is 144x4 − 48x3 − 461x2 + 40x + 325 which has roots x = 1, x = 5/3, x = −5/4, and x = −13/12.
We now find ourselves in the interesting situation of knowing the x and y components of the
points of intersection, but we don’t know which x goes with which y! One way to determine that is
simply to evaluate each curve equation with every x and every y to see which (x, y) pairs satisfy both
curve equations simultaneously. A more clever way is to use Euclid’s algorithm. In fact, Euclid’s
algorithm spares us the trouble of computing both the x-resultant and the y-resultant.
Suppose we had only computed the y-resultant and we wanted to find the y-coordinate of the
point of intersection whose x-coordinate is 5/3. That is to say, we want to find a point ( 35 , y) which
satisfies both curve equations. We substitute x = 5/3 into the circle equation to get 16/6 − y 2 = 0
and into the hyperbola equation to get 6y 2 − 15y + 28/3 = 0. We now simply want to find a
value of y which satisfies both of these equations. Euclid’s algorithm tells us that the GCD of these
two 3y − 4 = 0, and thus one point of intersection is ( 35 , 43 ).
19.4 Discriminants
The discriminant of a univariate polynomial is the resultant of the polynomial and its first deriva-
tive. If the discriminant is zero, the polynomial has a double root. (Why?) We all encountered
discriminants as early as 7th grade in connection with the quadratic equation. For a degree two
polynomial at2 + bt + c, the value b2 −4ac is referred to as the discriminant, although if we actually
compute the resultant of at2 + bt + c and its derivative 2at + b, we find that the discriminant is
actually a2 (b2 − 4ac). However, since it is understood that a 6= 0, the discriminant can only vanish
if b2 − 4ac = 0.
It is also possible to compute the discriminant of an implicit curve by taking the resultant of
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
246 Parametrizing Unicursal Curves
the implicit equation and its partial derivative with respect to one of the variables. To do this, we
treat the implicit equation as a polynomial in y whose coefficients are polynomials in x (or, vice
versa). The resultant will then be a polynomial in x with constant coefficients. The roots of that
polynomial will correspond to the x coordinates of the vertical tangents and of any double points.
Graphically, the discriminant can be thought of as the silhouette of the curve.
x2 − 2x + y 2 = 0
which is a unit circle centered at (0, 1). We next make the substitution y = tx and solve for x as a
function of t:
x2 (1 + t2 ) − 2x = 0
2
x =
1 + t2
2t
y = tx =
1 + t2
Notice that y = tx is a family of lines through the origin. A one parameter family of lines (or,
of any implicitly defined curves) is known as a pencil of lines or curves. The variable line y = tx
intersects the curve once at the origin, and at exactly one other point (because of Bezout’s theorem).
Thus, we have established a one-one correspondence between points on the curve and values t which
correspond to lines containing that point and the origin.
An example of a circle parametrized in this manner is shown in Figure 19.6.
The same trick can be played with a genus zero cubic curve which has been translated so that
its double point lies on the origin. if this happens, its implicit equation involves terms of degree two
and three only. For example, consider the curve
which has a double point at the origin. Again make the substitution y = tx to obtain
From which
5 + 6t + 7t2 5t + 6t2 + 7t3
x = − , y = tx = −
1 + 2t + 3t2 + 4t3 1 + 2t + 3t2 + 4t3
An example of a cubic curve parametrized in this manner is shown in Figure 19.7.
In general, a cubic curve does not have a double point, and if it does, that double point is not
generally at the origin. Thus, before one can parametrize a cubic curve, one must first compute the
location of its double point (or, determine that rational parametrization is not possible if there is
no double point).
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Parametrizing Unicursal Curves 247
t = y/x = 1
(1,1)
t = y/x
(1.8,.6)
t = y/
(0,0) (2,0)
(1.6,-.8)
t = y/x =-
Y t = y/x =
(6,6)
1 t=y
-1.2 (9,4.5
-1
1.5 t
(9,0)
1.7
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
248 Undetermined Coefficients
Double points satisfy the equations f (x, y) = fx (x, y) = fy (x, y) = 0. Consider the cubic curve
f (x, y) = −21 + 46 x − 13 x2 + x3 + 25 y − 23 x y + 3 x2 y − 9 y 2 + 3 x y 2 + y 3
for which
fx (x, y) = 46 − 26 x + 3 x2 − 23 y + 6 x y + 3 y 2
and
fy (x, y) = 25 − 23 x + 3 x2 − 18 y + 6 x y + 3 y 2
From section 19.3, we compute the x coordinates of the intersections of fx = 0 and fy = 0 by taking
the resultant of fx and fy with respect to y:
whose roots are y = 3 and y = 11 4 . From these clues, we find that the only values of (x, y) which
satisfy f (x, y) = fx (x, y) = fy (x, y) = 0 are (x, y) = (2, 3), which is therefore the double point.
This curve can be parametrized by translating the implicit curve so that the double point lies at
the origin. This is done by making the substitution x = x + 2, y = y + 3, yielding
2 x2 + x3 + 7 x y + 3 x2 y + 6 y 2 + 3 x y 2 + y 3
Parametrization is then performed using the method discussed earlier in this section,
and the parametrized curve is translated back so that the doubled point is again at (2, 3):
6t2 + 7t + 2 2t3 − t
x=− + 2 = ;
t3 + 3t2 + 3t + 1 t3 + 3t2 + 3t + 1
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Undetermined Coefficients 249
and five points (xi , yi ) which we wish the curve to interpolate. The coefficients cij can be solved
from the system of linear equations:
2 2
20
x1 x1 y1 y1 x1 y1 1
c11
x22 x2 y2 y22 x2 y2 1
c02
2
x3 x3 y3 y32 x3 y3 1 = 0.
2
x4 x4 y4 y42 x4 y4 1
c10
c01
x25 x5 y5 y52 x5 y5 1
c00
Of course, this method can be applied to any special equation. For example, the general equation
of a circle is (x − a)2 + (y − b)2 − r2 = 0. A circle through three points can be found by applying
the method of undetermined coefficients to the equation√Ax + By + C = x2 + y 2 to compute
A, B, C. Then, we find a = A/2, b = B/2, and r = C + a2 + b2 .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
250 Undetermined Coefficients
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 20
Hybrid Curves
can be expressed as a degree n plane polynomial Bézier curve H(t) with a moving control point
M(t):
H(t) ≡ R(t)
Xn
= Bin (t)Pi + M(t)Bm
n
(t)
i=0,i6=m
= (xH (t), yH (t)) (0 < m < n), (20.2)
where
Pr r
i=0 Bi (t)wi Mi
M(t) = P r r (20.3)
i=0 Bi (t)wi
is a degree r plane rational Bézier curve. The curve H(t) is called a Hybrid Curve [SK91]. Fig-
ure 20.1.a shows a rational cubic curve, and Figure 20.1.b shows that same curve represented as a
degree two hybrid curve. Figure 20.1.c shows how to evaluate a point H(t) on a hybrid curve — you
first evaluate the moving control point at M(t). The polynomial Bézier curve can then be evaluated,
treating point M(t) as a stationary control point (P1 in this case). Figure 20.1.d shows the curve
in Figure 20.1.a represented as a degree four hybrid curve.
As derived in [SK91], the Pi and Mi can be computed:
For i = 0, . . . , m − 1:
P0 = R0 ,
Pmin(r,i) r
n
j=1 j i−j wj [Rj − Pi−j ]
Pi = R0 + . (20.4)
w0 ni
251
252
V11,1
V21,1 1,1
V (t) = H11,1
R1
R2
V01,1 V31,1
R0 R3 H21,1 H21,1
H01,1 H01,1
a) Degree 3 Rational Curve b) Quadratic Hybrid Curve c) Quadratic Hybrid Curve
V12,2 V22,2
V32,2 V13,3 V23,3
V02,2 4,4
V (t)
V03,3 V3,3
3
H43,3 H34,4 H54,4
H12,2 H32,2 H23,3
H24,4 H64,4
H13,3 H53,3 H74,4
H14,4
H42,2 H63,3 H84,4
H02,2 H03,3 H04,4
d) Quartic Hybrid Curve e) Degree 6 Hybrid Curve f) Degree 8 Hybrid Curve
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
253
For i = n + r, . . . , m + 1 + r:
Pn = Rr ,
Pr−1 r
n
j=max(0,i−n) j i−j wj [Rj − Pi−j ]
Pi−r = Rr + n
. (20.5)
wr i−r
For i = 0, . . . , r:
min(i+m,r) r
n
X j i+m−j wj [Rj − Pi+m−j ]
Mi = n r
+ Ri . (20.6)
wi m i
j = max(0, i + m − n)
j 6= i
The moving control point is always a rational curve of the same degree as the original rational
curve. Also, the control point weights of the moving control point curve is the same as those of the
original rational curve.
If we simply replace the moving control point M(t) with a stationary control point Pm , the
hybrid representation H(t) of the rational curve R(t) leads directly to a polynomial approximation
P(t) (as in equation 20.10). An intelligent choice of point Pm is the midpoint of the x/y min-max
box which bounds the moving control point. Denote the width of such a bounding box as 2|4x |, the
heighth 2|4y |, and the diagonal 2||4||. If n is an even number, m = n/2, and ||M(t) − Pm || ≤ ||4||,
then
n 1
||P(t) − H(t)|| ≤ ||4|| n , (20.7)
2 2n
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
254 PLANAR AREAS
Note that ||4|| for the quartic hybrid curve is smaller than ||4|| for the quadratic hybrid curve.
This is often, though not always, the case, depending on the radius of convergence. Conditions
under which convergence does occur is discussed in [WS93]. However, as illustrated in Figure 20.2,
each half of a subdivided rational curve always has a smaller value of ||4|| than does the original
rational curve.
where A, B, a, b and c are constants and k is a positive integer. This method leads to straightforward
closed-form integration formulae for degree two rational functions, and significantly more compli-
cated formulae for degree three and four cases. Closed-form integration formulae do not generally
exist for degree greater than four.
Numerical integration [BF89], using methods such as the trapezoid rule, Simpson’s rule, etc., is
the technique most often applied in practice. But for rational functions, determining an error bound
is expensive, since it involves finding a bound on high order derivatives of a rational function.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Integrals Involving Plane Bézier Curves 255
The area under a curve given by equation 20.10 over the interval [x0 , xn ] (see Figure 20.3) is:
Z xn
Area = yP dxP
x0
n
X (n) dxP (t)
= n Di,j yi xj , ( 6= 0, 0 ≤ t ≤ 1). (20.13)
i,j=0
dt
The area contained in the sector formed by the origin and a curve given by equation 20.10 (see
Figure 20.4) is:
1 1
Z
dP(t)
Directed Area = P(t) ∧ dt
2 0 dt
n
X (n) dP(t)
= n Di,j (Pi ∧ Pj ), (P(t) ∧ 6= 0, 0 ≤ t ≤ 1),(20.14)
dt
i, j = 0
i<j
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
256 Integrals Involving Plane Bézier Curves
P2
y
P1
P0
R
P3
x0 xn
P2
y
P1
P0
P3
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Error Bounds on Integration 257
x yi
Pi ∧ Pj = i . (20.15)
xj yj
The first moments of area of R (in Figure 20.3) about the x- and y-axes are:
xn
1 2
Z
Ix = yP dxP
x0 2
n
n X (n)
= Di,j,k yi yj xk . (20.16)
2
i,j,k=0
Z xn
Iy = xP yP dxP
x0
n
(n)
X
= n Di,j,k xi yj xk . (20.17)
i,j,k=0
The volume of a solid of revolution generated by revolution of region R (in Figure 20.3) about the
x-axis is:
Z xn
V olume = πyP2 dxP
x0
= 2πIx . (20.18)
Computing areas, etc., of rational Bézier curves can be done by first approximating the rational curve
with a polynomial curve (as discussed in chapter 20), then applying the closed form equations for
polynomial curves. This section discusses how to determine error bounds on the resulting integration
values.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
258 Error Bounds on Integration
From [Flo92], bounds for P0 (t), R0 (t), P(t), and R(t) are
R
x Rx
Of special interest is the error bound x0n yR dxR − x0n yP dxP which expresses the error in applying
integration formulae directly to polynomial approximations of rational curves:
Z xn Z xn Z 1 Z 1
yR dxR − yP dxP = yR x0R dt − yP x0P dt
x0 x0 0 0
Z 1 Z 1
= yH x0H dt − yP x0P dt
0 0
Z 1
= (yH x0H − yH x0P + yH x0P − yP x0P )dt
0
Z 1 Z 1
= yH d(xH − xP ) + (yH − yP )x0P dt
0 0
Z 1 Z 1
0
= − (xH − xP )yH dt + (yH − yP )x0P dt,
0 0
and hence
Z xn Z xn Z 1 Z 1
0
|yH − yP | · |x0P |dt
yR dxR − yP dxP ≤ |xH − xP | · |yH |dt +
x0 x0 0 0
≤ BxP H · By0 R + ByP H · Bx0 P . (20.27)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Error Bounds on Integration 259
Likewise,
Z 1 Z 1 Z 1 Z 1
dR dP dH dP
R∧ dt − P∧ dt = H∧ dt − P∧ dt
0 dt 0 dt
0 dt 0 dt
Z 1 Z 1
dH dP dP
= H ∧ ( − ) dt + (H − P) ∧ dt
0 dt dt 0 dt
Z 1 Z 1
0 xH 0
yH xH − xP yH − yP
= 0 dt + dt
− yP0 x0P yP0
x −x yH
0 H P 0
Z 1 Z 1 Z 1
0
− yP0 )dt − yH (x0H − x0P )dt + (xH − xP )yP0 dt
=
xH (yH
0 0 0
Z 1
(yH − yP )x0P dt
−
0
Z 1 Z 1 Z 1
0 0
(xH − xP )yP0 dt
= −
(yH − yP )x H dt + (x H − x )y
P H dt +
0 0 0
Z 1
(yH − yP )x0P dt
−
0
Z 1 Z 1
0 0 0 0
= (xH − xP )(yH
+ yP )dt − (yH − yP )(xH + xP )dt
0 0
Z 1 Z 1
0
≤ |xH − xP |(|yH | + |yP0 |)dt + |yH − yP |(|x0H | + |x0P |)dt
0 0
≤ BxP H · (By0 R + By0 P ) + ByP H · (Bx0 R + Bx0 P ). (20.28)
Z xn Z xn Z 1 Z 1
2 2 0 2 0
yP2 dxP =
yR dxR −
y x
H H dt − y x
P P dt
x0 x0 0 0
Z 1 Z 1
0 0
2
yH (yH − yP )x0P dt+
=
yH (xH − xP )dt +
0 0
Z 1
0
yP (yH − yP )xP dt
0
Z 1 Z 1
0 0
= −2
(xH − xP )yH yH dt + (yH − yP )(yH + yP )xP dt
0 0
Z 1 Z 1
0
≤ 2 |xH − xP ||yH ||yH |dt + |yH − yP |(|yH | + |yP |)|x0P |dt
0 0
≤ 2(BxP H · By0 R · ByR ) + ByP H · Bx0 P · (ByR + ByP ). (20.29)
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
260 Examples
Z xn Z xn Z 1 Z 1
xH yH x0H dt − xP yP x0P dt
xR yR dxR − xP yP dxP =
x0 x0 0 0
Z 1 Z 1
0 0
xH (yH − yP )x0P dt+
= xH yH (xH − xP )dt +
0 0
Z 1
0
(xH − xP )yP xP dt
0
Z 1 Z 1
(xH − xP )(x0H yH + xH yH 0
(yH − yP )xH x0P dt+
= − )dt +
0 0
Z 1
(xH − xP )yP x0P dt
0
Z 1
= (xH − xP )(−x0H yH − xH yH 0
+ x0P yP )dt+
0
Z 1
0
(yH − yP )xH xP dt
0
Z 1
≤ |xH − xP |(|x0H ||yH | + |xH ||yH
0
| + |x0P ||yP |)dt +
0
Z 1
|yH − yP ||xH ||x0P |dt
0
≤ BxP H · (Bx0 R · ByR + By0 R · BxR + Bx0 P · ByP ) +
ByP H · Bx0 P · BxR . (20.30)
20.4 Examples
Since the integration error is a function of the hybrid curve bounding box size, that error can be
controlled by recursively splitting R(t) in half until the bounding boxes are small enough to satisfy
the ultimate integration error limit. Then, the exact integration formulae for polynomial curves can
be used.
We have implemented this algorithm and compared it against two standard methods of numerical
integration: the trapezoid rule, and Simpson’s rule. It turns out that the trapezoid rule can be
easily modified to return an error bound when dealing with rational Bézier curves. Imagine we are
computing the area between the x axis and a rational Bézier curve. Then the top of each trapezoid
is a line segment which approximates a segment of the rational Bézier curve. The convex hull of the
control points of that curve segment then serves as a bound on how accurately a given trapezoid
approximates the differential area.
The traditional way to determine an error bound for Simpson’s rule requires us to obtain a
bound on the fourth derivative of the integrand x0 (t)y(t) (for areas) or πx0 (t)y 2 (t) (for volumes).
This is possible, but for a degree r rational Bézier curve, the fourth derivative of the area (volume)
integrand is a rational function of degree 48r (64r). Instead of using this robust error bound in our
implementation of Simpson’s rule, we used the heuristic of comparing the answer obtained using
m intervals with the answer obtained using 2m intervals. This, of course, provides only a general
indication of the error, not a guarantee of precision.
Figures 20.5 and 20.6 show two test cases in which the shaded area and volume of revolution
about the x axis were computed. Figure 20.6 is actually a semi-circle expressed as a cubic rational
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Examples 261
Y P1 = (6,10) P3
w1 = 2
P2 = (13,7)
P0 = (2,5) w2 = 3
w0 = 1
Bézier curve.
Tables 20.4 and 20.4 list the execution time in milliseconds. Tests were run on a workstation
rated at 65 Specmarks. The exact area of the semi-circle is π/8 = .39269908 . . ., and the computed
area using hybrid curves is 0.39269906 using a tolerance of 10−6 , and 0.39272477 using a tolerance
of 10−3 .
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
262 Examples
P1 = (0,1) P2 = (1,1)
w1 = 1 w2 = 1
P0 = (0,0) P3 = (1,0)
w0 = 3 w3 = 3
Figure 20.6: Example 2
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Chapter 21
A planar quadrilateral with vertices Pij = (xij , yij ) defines a bilinear map
where s̄ = (1−s) and t̄ = (1−t). If the quad is a trapezoid, the map is 1:1. Otherwise, the map is
P01=(8,6) t=1
P11=(12,4) t=.75
E=(8,4) E
t=0
P10=(12,0) t=2 t=1.5
P00=(0,0)
(a) Lines for 0 ≤ t ≤ 1. (b) Lines for 0 ≤ t ≤ 2.
generally 2:1 and the inverse involves a square root [Wol90]. For point E in Figure 21.1.a,
p p
x − 4y + 36 ± f (x, y) −x + 4y + 36 ± f (x, y)
s= , t= ,
24 32
where f (x, y) = x2 − 8xy + 16y 2 − 72x − 96y + 1296. So E has pre-images (s, t) = ( 13 , 34 ) and
(s, t) = (2, 2). Figure 21.1.b shows that E lies on two different t-isoparameter lines: t = 34 and t = 2.
This paper proves that assigning a weight wij to one control point, the map defined by any
non-degenerate quadrilateral can be forced to be generally 1:1 with a rational linear inverse.
For example, in Figure 21.2.a we assign w01 = 35 to the quad in Figure 21.1. In this case, point
E lies on a single s- and t-isoparameter line. The inversion equations are s = 3x−4y 2y
26−4y and t = 20−x
and the pre-image of E is (s, t) = ( 52 , 23 ). This is an example of a birational map, meaning that both
the map and its inverse can be expressed as a polynomial divided by a polynomial.
263
264 Birational Quadrilaterals
t=1 As
As
w01=5/3 Q01
It(t) Bs(s)
t=.5 Q11
E Ct(t)
Bt(t)
At
t=0 At Q00 Cs(s) Q10
s=0 s=.5 s=1 Is(s)
(a) Two pencils of lines (b) P oint(Q00 ) is labelled Q00 , etc.
5
Figure 21.2: With w01 = 3. Both families of isoparameter lines form pencils.
respectively. We now show how those pencils can be created by assigning a single control point
weight.
Given a triple Q = (a, b, c) of homogeneous projective coordinates, Point(Q) denotes the point
whose Cartesian coordinates are (a/c, b/c) and Line(Q) denotes the line ax+by+c = 0. Given triples
Q1 and Q2 , Line(Q1 ) and Line(Q2 ) intersect at Point(Q1 × Q2 ) and Point(Q1 ) and Point(Q2 ) lie
on Line(Q1 × Q2 ). The projective coordinates robustly express the intersection of two parallel lines
as a point at infinity, i.e., a point for which c = 0.
If Q1 · Q2 = 0, Point(Q1 ) lies on Line(Q2 ). If Q(t) = (a(t), b(t), c(t)) is a triple of polynomials,
Point(Q(t)) is a rational curve and Line(Q(t)) is called a moving line [SSQK94], i.e., a line that
moves as a function of t. Denoting Qij = (xij , yij , 1) and Q̃ij = wij Qij ,
Q(s, t) =P oint Q̃00 s̄t̄+ Q̃10 st̄+ Q̃01 s̄t+ Q̃11 st (21.2)
(A × B) × (C × D) = (A · (B × D))C − (A · (B × C))D,
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Inversion Equations 265
Point P = (x, y, 1) lies on Line(Is (s)) at the value of s for which |As Bs (s)P| = 0:
|As Q̃01 P|
s= . (21.8)
|As Q̃01 P| − |As Q̃11 P|
P also lies on Line(Is (s)) at the value of s for which |As Cs (s)P| = 0:
|As Q̃00 P|
s= . (21.9)
|As Q̃00 P| − |As Q̃10 P|
|At Q̃10 P|
t= (21.10)
|At Q̃10 P| − |At Q̃11 P|
|At Q̃00 P|
t= . (21.11)
|At Q̃00 P| − |At Q̃01 P|
If no three vertices are collinear, (21.8) and (21.9) produce the same value of s and (21.10) and
(21.11) produce the same value of t, so all four are valid inversion equations. If Q10 , Q11 , and
Q11 w11=0
t=1
t=1
Q01=As Q01=As
Q11 w11=0
t=0 Q10=At t=0 Q10=At
0 Q00 0 Q00
s=
s=
s= s=
1
Q01 are collinear, as shown in Figure 21.3.a, (21.6) requires w11 = 0 and the geometry produces
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
266 Singularities
t=1
s=1 Q01=(8,6,1) As
= 0 s=
As s
0
1 w =4
s=
10
Q11=(6,2,1); w11=-4.2 Q01=(3,6,1) Q10=(6,6,1)
t=0 At
t=0 t=1
Q00=(0,0,1) At Q10=(12,0,1) Q00=(0,0,1)
Q11=(12,0,1)
As = Q01 and At = Q10 . Consequently, (21.9) and (21.11) are valid inversion equations but (21.8)
and (21.10) are not. The same discussion applies to the “hanging” vertex example in Figure 21.3.b.
In the case of a non-convex quadrilateral, the weight of the concave vertex is negative, as illus-
trated in Figure 21.4.a. While the inversion equations work in this case, only points within the region
bounded by quadrilateral Q00 At Q11 As have pre-images in the [0, 1] × [0, 1] domain. The inversion
equations work properly in the self-intersection case shown in Figure 21.4.b, and the pre-image of
each point in the twisted quadrilateral lie in the [0, 1] × [0, 1] domain. In this example, all weights
are positive, even though two of the triple-products in (21.6) are negative. We can also satisfy (21.6)
by assigning w10 = w01 = −2, however the inversion equation for s applied to points in the twisted
quadrilateral lie outside [0, 1].
21.3 Singularities
The birational maps we have presented are generally 1:1, but not everywhere. Pencils Line(Is (s))
and Line(It (t)) have one line in common: Line(As × At ). From (21.8)–(21.11), all points on that
line have an s parameter
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Discussion 267
|Q10 Q01 Q11 |:|Q00 Q01 Q11 |:|Q00 Q11 Q10 |:|Q00 Q01 Q10 | (21.13)
The fact that a quad map (21.2) is affine if it satisfies (21.13) is algebraically equivalent to a well-
known result for mapping the vertices of a quad to the vertices of a square by solving a 4 × 4 linear
system [Wol90]. Affine maps are birational, and weights that satisfy (21.13) also satisfy (21.6).
21.5 Discussion
The main contribution of this paper is (21.6). This result says that we can assign weights to any
three vertices of a planar quad and solve for the fourth weight using (21.6) such that the quad will
be birational. Thus, birationality can be obtained by imposing a single scalar constraint.
Using this insight, a planar mesh of quads whose map is C 0 can be constructed by growing the
mesh one quad at a time and solving for the free weight(s) using (21.6). By contrast, the condition
(21.13) for affine map has no degrees of freedom, so if quads in a mesh were each made birational
using the method in Section 21.4, the map derived from such a mesh would be C −1 .
Figure 21.1.b can be interpreted as the projection of a doubly-ruled quadric surface, a topic
studied in classical projective geometry [SK79] where it is well-known, for example, that the envelope
curve shown in Figure 21.1.b is a conic. However, to our knowledge, the result in (21.6) has not
appeared in the literature, either classical or recent.
While the results in this paper apply only to planar quadrilaterals, non-planar bi-linear patches
are always birational, for any choice of weights [SAG84].
Quadrilaterals and quad meshes have played an important role in computer graphics, geometric
design, and analysis for several decades, and it is somewhat surprising that the insight in Section 21.1
has been overlooked. While the result is relatively simple, its importance is amplified because quad
meshes are ubiquitous. The concept can be of value in algorithms where inverse maps need to be
calculated, such as image warping, morphing, and texture mapping in ray tracing.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
268 Discussion
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
Bibliography
[B7́4] Pierre Bézier. Mathematical and practical possibilities of unisurf. In Robert E. Barnhill
and Richard F. Riesenfeld, editors, Computer Aided Geometric Design, pages 317–326.
Academic Press, 1974.
[B8̈1] Wolfgang Böhm. Generating the Bézier points of B-spline curves and surfaces. Computer-
Aided Design, 13:355–356, 1981.
[B8́6] Pierre Bézier. The Mathematical Basis of the UNISURF CAD System. Butterworths,
London, 1986.
[Bal74] Alan A. Ball. Consurf. part 1: Introduction to the conic lofting tile. Computer-Aided
Design, 6:243–249, 1974.
[BCC+ 10] Y. Bazilevs, V.M. Calo, J.A. Cottrell, J.A. Evans, T.J.R. Hughes, S. Lipton, M.A. Scott,
and T.W. Sederberg. Isogeometric analysis using t-splines. Computer Methods in Applied
Mechanics and Engineering, 199(58):229 – 263, 2010. Computational Geometry and
Analysis.
[Buc65] B. Buchberger. Ein Algorithmus zum Auffinden der Basiselemente des Restklassenringes
Nach Einem Nulldimensionalen Polynomideal. PhD thesis, Universitat Innsbruck, Aus-
tria, 1965.
269
270 BIBLIOGRAPHY
[CLO92] David Cox, John Little, and Donal O’Shea. Ideals, Varieties and Algorithms. Springer-
Verlag, 1992.
[CR74] Edwin Catmull and R. Rom. A class of local interpolating splines. In Robert E. Barnhill
and Richard F. Riesenfeld, editors, Computer Aided Geometric Design, pages 317–326.
Academic Press, 1974.
[Dav63] Philip J. Davis. Interpolation and Approximation. Dover, New York, 1963.
[dB78] Carl de Boor. A Practical Guide to Splines. Springer–Verlag, New York, 1978.
[Far90] Gerald Farin. Curves and Surfaces for Computer Aided Geometric Design. Academic
Press, Boston, 1990.
[Far08] Rida T Farouki. Pythagoreanhodograph Curves. Springer, 2008.
[Flo92] Michael S. Floater. Derivatives of rational Bézier curves. Computer Aided Geometric
Design, 9:161–174, 1992.
[FP79] Iver D. Faux and Michael J. Pratt. Computational Geometry for Design and Manufacture.
Ellis Horwood, Chichester, 1979.
[FR87] Rida T. Farouki and V. T. Rajan. On the numerical condition of polynomials in Bernstein
form. Computer Aided Geometric Design, 4:191–216, 1987.
[FR88] Rida T. Farouki and V. T. Rajan. Algorithms for polynomials in Bernstein form. Com-
puter Aided Geometric Design, 5:1–26, 1988.
[FS90] Rida T Farouki and Takis Sakkalis. Pythagorean hodographs. IBM Journal of Research
and Development, 34(5):736–752, 1990.
[GSA84] Ronald N. Goldman, Thomas W. Sederberg, and David C. Anderson. Vector elimina-
tion: A technique for the implicitization, inversion, and intersection of planar parametric
rational polynomial curves. Computer Aided Geometric Design, 1:327–356, 1984.
[GZ84] Wang Guo-Zhao. The subdivision method for finding the intersection between two Bézier
curves or surfaces. Zhejiang University Journal special issue on computational geometry,
pages 108–119, 1984.
[Han78a] E. Hansen. A globally convergent interval method for computing and bounding real roots.
BIT, 18:415–424, 1978.
[Han78b] E. Hansen. Interval forms of Newton’s method. Computing, 20:153–163, 1978.
[HL93] J Hoschek and D Lasser. Fundamentals of Computer Aided Geometric Design. A K
Peters, 1993.
[Hos83] Josef Hoschek. Dual Bézier curves and surfaces. In Robert E. Barnhill and Wolfgang
Boehm, editors, Surfaces in Computer Aided Geometric Design. North-Holland, 1983.
[Hos87] Josef Hoschek. Approximate conversion of spline curves. Computer Aided Geometric
Design, 4:59–66, 1987.
[Hos88] Josef Hoschek. Intrinsic parameterization for approximation. Computer Aided Geometric
Design, 5:27–31, 1988.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
BIBLIOGRAPHY 271
[KM83] P. A. Koparkar and S. P. Mudur. A new class of algorithms for the processing of para-
metric curves. Computer-Aided Design, 15:41–45, 1983.
[Liu87] D. Liu. Algorithms for computing area and volume bounded by Bézier curves and sur-
faces. Mathematica Numerica Sinica, 9:327–336, 1987.
[LM87] Tom Lyche and Knut Mørken. Knot removal for parametric B–spline curves and surfaces.
Computer Aided Geometric Design, 4:217–230, 1987.
[LR80] Jeffery M. Lane and Richard F. Riesenfeld. A theoretical development for the computer
generation and display of piecewise polynomial surfaces. IEEE Trans. RAMI, 2:35–46,
1980.
[MK84] S. P. Mudur and P. A. Koparkar. Interval methods for processing geometric objects.
IEEE Computer Graphics and Applications, 2:7–17, 1984.
[Moo79] R. E. Moore. Methods and Applications of Interval Analysis. SIAM, Philadelphia, 1979.
[NLL90] Horst Nowacki, D. Liu, and X. Lu. Fairing Bézier curves with constraints. Computer
Aided Geometric Design, 7:43–55, 1990.
[NSK90] Tomoyuki Nishita, Thomas W. Sederberg, and Masanori Kakimoto. Ray tracing trimmed
rational surface patches. Computer Graphics, 24:337–345, 1990.
[Ram89a] Lyle Ramshaw. Béziers and B-splines as multiaffine maps. In R. A. Earnshaw, editor,
Theoretical Foundations of Computer Graphics and CAD, volume 40 of ASI Series F,
pages 757–776. NATO, Springer-Verlag, 1989.
[Ram89b] Lyle Ramshaw. Blossoms are polar forms. Computer Aided Geometric Design, 6:323–358,
1989.
[Rok75] J. Rokne. Reducing the degree of an interval polynomial. Computing, 14:5–14, 1975.
[Sab87] Malcolm A. Sabin. Envelope curves and surfaces. In Ralph R. Martin, editor, The
Mathematics of Surfaces II, pages 413–418. Oxford University Press, 1987.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
272 BIBLIOGRAPHY
[SAG84] Thomas W. Sederberg, David C. Anderson, and Ronald N. Goldman. Implicit representa-
tion of parametric curves and surfaces. Computer Vision, Graphics and Image Processing,
28:72–84, 1984.
[Sal34] George Salmon. Higher Plane Curves. G.E.Stechert & Co., 1934.
[SCF+ 04] Thomas W. Sederberg, David L. Cardon, G. Thomas Finnigan, Nicholas S. North, Jian-
min Zheng, and Tom Lyche. T-spline simplification and local refinement. In ACM
SIGGRAPH 2004 Papers, SIGGRAPH ’04, pages 276–283, New York, NY, USA, 2004.
ACM.
[Ser82] J. Serra. Image Analysis and Mathematical Morphology. Academic Press, New York,
1982.
[SK79] J.G. Semple and G.T. Kneebone. Algebraic projective geometry. Oxford Science Publi-
cations. Clarendon Press, 1979.
[SK91] Thomas W. Sederberg and Masanori Kakimoto. Approximating rational curves using
polynomial curves. In Gerald Farin, editor, NURBS for Curve and Surface Design, pages
149–158, Philadelphia, 1991. SIAM.
[SLSH12] M.A. Scott, X. Li, T.W. Sederberg, and T.J.R. Hughes. Local refinement of analysis-
suitable t-splines. Computer Methods in Applied Mechanics and Engineering, 213216:206
– 222, 2012.
[SN90] Thomas W. Sederberg and Tomoyuki Nishita. Curve intersection using Bézier clipping.
Computer-Aided Design, 22:538–549, 1990.
[SP86b] Thomas W. Sederberg and Scott R. Parry. Free-form deformation of solid geometric
models. Computer Graphics, 20:151–160, 1986.
[Spe94] Melvin R. Spencer. Polynomial Real Root Finding in Bernstein Form. PhD thesis,
Brigham Young University, 1994.
[SSQK94] Thomas W Sederberg, Takafumi Saito, Dongxu Qi, and Krzysztof S Klimaszewski. Curve
implicitization using moving lines. Computer Aided Geometric Design, 11(6):687–706,
1994.
[SW87] Thomas W. Sederberg and Xuguang Wang. Rational hodographs. Computer Aided
Geometric Design, 4:333–335, 1987.
[SWZ89] Thomas W. Sederberg, Scott C. White, and Alan K. Zundel. Fat arcs: a bounding region
with cubic convergence. Computer Aided Geometric Design, 6:205–218, 1989.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017
BIBLIOGRAPHY 273
[SZBN03] Thomas W. Sederberg, Jianmin Zheng, Almaz Bakenov, and Ahmad Nasri. T-splines
and t-nurccs. ACM Trans. Graph., 22(3):477–484, July 2003.
[SZSS98] T W Sederberg, J Zheng, D Sewell, and M Sabin. Non-uniform recursive subdivision
surfaces. Proceedings of SIGGRAPH 98, pages 387–394, July 1998. ISBN 0-89791-999-8.
[Tim80] Harry G. Timmer. Alternative representation for parametric cubic curves and surfaces.
Computer-Aided Design, 12:25–28, 1980.
[Win23] R. M. Winger. An Introduction to Projective Geometry. D. C. Heath and Company,
1923.
[Wol90] George Wolberg. Digital image warping, volume 10662. IEEE Computer Society Press,
Los Alamitos, CA, 1990.
[WS93] Guo-Jin Wang and Thomas W. Sederberg. Convergence conditions for hermite approxi-
mation of rational functions. submitted, 1993.
[WW88] Mark A. Watkins and Andrew J. Worsey. Degree reduction of Bézier curves. Computer-
Aided Design, 20:398–405, 1988.
T. W. Sederberg, BYU, Computer Aided Geometric Design Course Notes July 25, 2017