Professional Documents
Culture Documents
(WS 2016/17)
Martin Held
FB Computerwissenschaften
Universitt Salzburg
A-5020 Salzburg, Austria
held@cosy.sbg.ac.at
UNIVERSITAT SALZBURG
Computational Geometry and Applications Lab
Personalia
Instructor (VO+PS): M. Held.
Email: held@cosy.sbg.ac.at.
Base-URL: http://www.cosy.sbg.ac.at/held.
Office: Universitt Salzburg, Computerwissenschaften, Rm. 1.20,
Jakob-Haringer Str. 2, 5020 Salzburg-Itzling.
Phone number (office): (0662) 8044-6304.
Phone number (secr.): (0662) 8044-6328.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 2
Formalia
URL of course (VO+PS): Base-URL/teaching/geom_mod/geom_mod.html.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 3
Electronic Slides and Online Material
In addition to these slides, you are encouraged to consult the WWW home-page of
this lecture:
http://www.cosy.sbg.ac.at/held/teaching/geom_mod/geom_mod.html.
In particular, this WWW page contains links to online manuals, slides, and code.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 4
A Few Words of Warning
I hope that these slides will serve as a practice-minded introduction to various aspects
of geometric modeling. I would like to warn you explicitly not to regard these slides as
the sole source of information on the topics of my course. It may and will happen that
Ill use the lecture for talking about subtle details that need not be covered in these
slides! In particular, the slides wont contain all sample calculations, proofs of
theorems, demonstrations of algorithms, or solutions to problems posed during my
lecture. That is, by making these slides available to you I do not intend to encourage
you to attend the lecture on an irregular basis.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 5
Acknowledgments
These slides are a revised and extended version of slides originally prepared by
Dominik Kaaser, Kamran Safdar, and Marko ulejic.
This revision and extension was carried out by myself, and I am responsible for all
errors.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 6
Legal Fine Print and Disclaimer
To the best of our knowledge, these slides do not violate or infringe upon somebody
elses copyrights. If copyrighted material appears in these slides then it was
considered to be available in a non-profit manner and as an educational tool for
teaching at an academic institution, within the limits of the fair use policy. For
copyrighted material we strive to give references to the copyright holders (if known).
Of course, any trademarks mentioned in these slides are properties of their respective
owners.
Please note that these slides are copyrighted. The copyright holder(s) grant you the
right to download and print it for your personal use. Any other use, including non-profit
instructional use and re-distribution in electronic or printed form of significant portions
of it, beyond the limits of fair use, requires the explicit permission of the copyright
holder(s). All rights reserved.
These slides are made available without warrant of any kind, either express or
implied, including but not limited to the implied warranties of merchantability and
fitness for a particular purpose. In no event shall the copyright holder(s) and/or their
respective employers be liable for any special, indirect or consequential damages or
any damages whatsoever resulting from loss of use, data or profits, arising out of or in
connection with the use of information provided in these slides.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 7
Recommended Textbooks I
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 8
Recommended Textbooks II
M.E. Mortenson.
Mathematics for Computer Graphics Applications.
Industrial Press, 2nd rev. edition, 1999; ISBN 978-0831131111.
A. Dickenstein, I.Z. Emiris (eds.).
Solving Polynomial Equations: Foundations, Algorithms, and Applications.
Springer, 2005; ISBN 978-3-540-27357-8.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 9
Table of Content
Introduction
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 10
Introduction
Motivation
Notation
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 11
Motivation: Evaluation of a Polynomial
I Assume that we have an intuitive understanding of polynomials and consider a
polynomial in x of degree n with coefficients a0 , a1 , . . . , an R, with an 6= 0:
n
X
p(x) := ai x i = a0 + a1 x + a2 x 2 + . . . + an1 x n1 + an x n .
i=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 13
Motivation: Smoothness of a Curve
I What is a characteristic difference between the three curves shown below?
I Answer: The green curve has tangential discontinuities at the vertices, the blue
curve consists of straight-line segments and circular arcs and is
tangent-continuous, while the red curve is a cubic B-spline and is
curvature-continuous.
I By the way, when precisely is a geometric object a curve?
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 14
Motivation: Tangent to a Curve
I What is a parameterization of the tangent line at a point (t0 ) of a curve ?
(t0 )
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 15
Motivation: Bzier Curve
I How can we model a smooth polynomial curve in R2 by specifying so-called
control points. (E.g., the points p0 , p1 , . . . , p10 in the figure.)
p9 p8
p2 p7
p3 p10
p6
p1 p5
p4
p0
I One (widely used) option is to generate a Bzier curve. (The figure shows a
Bzier curve of degree 10 with 11 control points.)
I What is the degree of a Bzier curve? Which geometric and mathematical
properties do Bzier curves exhibit?
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 16
Motivation: B-Spline Curve
I How can we model a polynomial curve in R2 by specifying so-called control
points such that a modification of one control point affects only a small portion
of the curve?
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 17
Motivation: NURBS
I Is it possible to parameterize a circular arc by means of a polynomial or rational
term?
I Yes, this is possible:
1 t2
2t
,
1 + t2 1 + t2
I More generally, NURBS can be used to model all types of conics by means of
rational parameterizations.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 18
Motivation: Approximation of a Continuous Function
I How can we approximate a continuous function by a polynomial?
I Answer: We can use a Bernstein approximation.
I Sample Bernstein approximations of a continuous function:
1
f : [0, 1] R f (x) := sin (x) + sin 6x + x 2
5
1.0 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0
I One can prove that the Bernstein approximation Bn,f converges uniformly to f on
the interval [0, 1] as n increases, for every continuous function f .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 19
Approximation of Polygonal Profiles
I How can we solve the following approximation problem?
I For a set of planar (polygonal) profiles,
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 20
Notation
I The set {1, 2, 3, . . .} of natural numbers is denoted by N, with N0 := N {0},
while Z denotes the integers (positive and negative) and R the reals. The
non-negative reals are denoted by R+ +
0 , and the positive reals by R .
I Open or closed intervals I R are denoted using square brackets: e.g.,
I1 = [a1 , b1 ] or I2 = [a2 , b2 [, with a1 , a2 , b1 , b2 R, where the right-hand [
indicates that the value b2 is not included in I2 .
I We use , , and letters in italics to denote scalar values: s, t, u.
I Points are also denoted by letters written in italics: p, q or, occasionally, P, Q. We
do not distinguish between a point and its position vector.
I The coordinates of a vector are denoted by using indices (or numbers): e.g.,
v = (vx , vy ), or v = (v1 , v2 , . . . , vn ).
I In order to state v Rn in vector form we will mix column and row vectors freely
unless a specific form is required, such as for matrix multiplication.
I The dot product of two vectors v and w is denoted by hv , wi.
I The vector cross-product (in R3 ) is denoted by a cross: v w.
I The length of a vector v is denoted by kv k.
I The straight-line segment between the points p and q is denoted by pq, or simply
by pq.
I Bold capital letters, such as M, are used for matrices.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 22
Mathematics for Geometric Modeling
Polynomials
Elementary Differential Calculus
Elementary Differential Geometry of Curves
Elementary Differential Geometry of Surfaces
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 23
Polynomials
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 25
Polynomials
I A (univariate) polynomial over R with variable x is a term of the form
an x n + an1 x n1 + + a1 x + a0 ,
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 26
Polynomial Arithmetic
I Instead of R any commutative ring (R, +, ) and symbols x, y , . . . that are not
contained in R would do.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 27
Polynomial Arithmetic
I We define the addition of polynomials based on the pairwise addition of
corresponding coefficients:
n
! n
! n
X i
X i
X
ai x + bi x := (ai + bi )x i
i=0 i=0 i=0
ax = xa and x m x k = x m+k
I Elementary properties of polynomials: One can prove easily that the addition,
multiplication and composition of two polynomials as well as their derivative and
antiderivative (indefinite integral) again yield a polynomial.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 28
Polynomials: Vector Space
Theorem 6
The univariate polynomials of R[x] form an infinite vector space over R. The
so-called power basis of this vector space is given by the monomials 1, x, x 2 , x 3 , . . ..
I Again, instead of R any commutative ring (R, +, ) and symbols x1 , x2 , . . . that are
not contained in R would do.
I The power basis is not the only meaningful basis of the polynomials R[x]: See,
e.g., the Bernstein basis polynomials that are used to form Bzier curves.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 29
Polynomials
I As usual, two (polynomial) functions are identical if their values are identical for
all arguments in R.
I Note: Two different polynomials may result in the same polynomial function!
(E.g., over finite fields.)
I While some fields of mathematics (e.g., abstract algebra) make a clear distinction
between polynomials and polynomial functions, we will freely mix these two
terms. Also, unless noted explicitly, we will only deal with polynomials over R.
I Note: Polynomial functions may come in disguise: f (x) := cos(2 arccos(x)) is a
polynomial function, since we have f (x) = 2x 2 1 for all 1 x 1.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 30
Polynomials
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 31
Polynomials
I Polynomials of degree
0. are called constant polynomials,
1. are called linear polynomials,
2. are called quadratic polynomials,
3. are called cubic polynomials,
4. are called quartic polynomials,
5. are called quintic polynomials.
Theorem 11 (Abel-Ruffini (1823))
No algebraic closed-form solution for the roots of an arbitrary polynomial of degree
five or higher exists.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 32
Horners Algorithm for Evaluation of a Polynomial
I Consider a polynomial of degree n with coefficients a0 , a1 , . . . , an R, with
an 6= 0:
n
X
p(x) := ai x i = a0 + a1 x + a2 x 2 + . . . + an1 x n1 + an x n .
i=0
hn := an
hi := x hi+1 + ai for i = 0, 1, 2, ..., n 1
14 return h;
15 }
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 34
Horners Algorithm for Evaluation of a Polynomial
Lemma 12
Horners Algorithm consumes n multiplications and n additions to evaluate a
polynomial of degree n.
Caveat
Subtractive cancellation could occur at any time, and there is no easy way to
determine a priori whether and for which data it will indeed occur.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 35
Forward Differencing
I If a polynomial has to be evaluated at k + 1 evenly spaced points x0 , x1 , . . . , xk ,
with xi+1 = xi + for 0 i < k , then forward differencing is faster than Horners
Algorithm.
I Consider a polynomial of degree one:
p(x) = a0 + a1 x
I The difference in the function values p(xi ) and p(xi+1 ) of two neighboring points
xi and xi+1 is
I Hence, to evaluate the polynomial at several points, we start with the evaluation
of p(x0 ) and recursively compute
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 36
Forward Differencing
I For a quadratic polynomial p(x) = a0 + a1 x + a2 x 2 the difference of the function
values of neighboring points is
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 37
Differentiation of Functions of One Variable
Definition 14
Let S R be an open set. A (scalar-valued) function f : S R is differentiable on
S if it is differentiable at every point of S.
If f is differentiable on S and f 0 is continuous on S then f is continuously
differentiable on S. In this case f is said to be of differentiability class C 1 .
I By taking one-sided limits one can also consider one-sided derivatives on the
boundary of closed sets S.
I By applying differentiation to f 0 , a second derivative f 00 of f can be defined.
Inductively, we obtain f (n) by differentiating f (n1) .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 39
Differentiation of Functions of One Variable
I If the k -th derivative of f exists then the continuity of f (0) , f (1) , . . . , f (k 1) is implied.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 40
Differentiation of Functions of One Variable
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 41
Differentiation of Functions of One Variable
Definition 20
For n N consider n functions fi : S R (with 1 i n) and define f : S Rn as
f1 (x)
f2 (x)
f (x) := . .
..
fn (x)
Note
A function of m variables may have all first-order partial derivatives at a point
(a1 , . . . , am ) but still need not be continuous at (a1 , . . . , am ).
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 43
Differentiation of Functions of Several Variables
I Higher-order partial derivatives of f are obtained by repeated computation of a
partial derivative of a (higher-order) partial derivative of f .
I Does it matter in which sequence we compute higher-order partial derivatives?
Theorem 22
f 2f 2f
Suppose that , f
x y
, y x
exist on a neighborhood of (x0 , y0 ), and that y x
is
2f
continuous at (x0 , y0 ). Then xy
(x0 , y0 ) exists, and we have
2f 2f
(x0 , y0 ) = (x0 , y0 ).
xy y x
I Note the difference between the Leibniz notation and the subscript notation for
higher-order mixed partial derivatives!
2f f
(x, y ) := ( )(x, y ) but fxy (x, y ) := (fx )y (x, y )
xy x y
I Also, note that Theorem 22 does not imply that it could not be simpler to
2
f 2f
compute, say, y x rather than xy :
q p
f (x, y ) := xe2y + ey sin(y tan(log y )) + 1 + y 2 cos2 y
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 44
Differentiation of Functions of Several Variables
Theorem 24
If a function f : S Rn of m variables is differentiable at a point a S then the
coefficients aij of the matrix J of Def. 23 are given by
fi
aij = (a) for i {1, 2, . . . , n} and j {1, 2, . . . , m}.
xj
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 45
Differentiation of Functions of Several Variables
Theorem 25
If a function f : S Rn of m variables is differentiable at a point a S then it is
continuous at a.
Theorem 26
f
If x , f , . . . , x
f
exist for a function f : S Rn of m variables on a neighborhood
1 x2 m
of a point a S and are continuous at a then f is differentiable at a.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 46
Curves
I Intuitively, a curve in R2 is generated by a continuous motion of a pencil on a
sheet of paper.
I A formal mathematical definition is not entirely straightforward, and the term
curve is associated with two closely related notions: kinematic and geometric.
I In the kinematic setting, a (parameterized) curve is a function of one real variable.
I In the geometric setting, a curve, also called an arc, is a 1-dimensional subset of
space.
I Both notions are related:
I The image of a parameterized curve describes an arc.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 48
Caveat: Sierpinski Curves
I Sierpinski curves are a sequence of recursively defined continuous and closed
curves in R2 .
I Sierpinski curve of orders 13 :
I Their limit curve, the Sierpinski curve, is a space-filling curve: It fills the unit
square completely!
I The Euclidean length Ln of the n-th Sierpinski curve is
2 1 1
Ln = (1 + 2)2n (2 2) n .
3 3 2
Hence, it grows exponentially and unboundedly as n grows.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 49
Curves in Rn
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 50
Curves in Rn
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 51
Curves in Rn
I Frequently properties of curves can also be stated independently of a specific
parameterization. E.g., we can regard a curve C to be simple if there exists one
parameterization of C that is simple.
I Similarly, we will frequently speak about a closed curve rather than about a
closed parameterization of a curve.
I Hence, the distinction between a curve and (one of) its parameterizations is often
blurred.
I For the sake of simplicity, we will not distinguish between a curve C and one of its
parameterizations if the meaning is clear.
I Similarly, we will frequently call a curve.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 52
Differentiable Curves
Definition 32 (C r -parameterization)
If : I Rn is r times continuously differentiable then is called a parametric curve
of class C r , or a C r -parameterization of (I), or simply a C r -curve.
If I = [a, b], then is called a closed C r -parameterization if (k ) (a) = (k ) (b) for all
0 k r.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 53
Differentiable Curves
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 54
Equivalence of Parameterizations in Rn
I Note that parameterizations of a curve (regarded as a set C Rn ) need not be
unique: Two different parameterizations : I Rn and : J Rn may exist
such that C = (I) = (J).
cos 2 t cos 2 t
(t) := (t) :=
sin 2 t sin 2 t
y y
x x
Figure : (t) for t [0, 0.9] Figure : (t) for t [0, 0.9]
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 55
Equivalence of Parameterizations in Rn
((t)) = (t) t I,
and
1. is continuous, strictly monotonously increasing and bijective,
2. both and 1 are r times continuously differentiable.
In this case the parametric curve is called a reparameterization of .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 56
Equivalence of Parameterizations in Rn
Theorem 38
Let : J Rn be a reparameterization of : I Rn . If is regular then is
regular.
Proof : Let be regular. Hence, is at least a C 1 -curve such that 0 (t) 6= 0 for all
t I. Let : I J be the mapping from I to J that establishes the equivalence of
and . Hence, and 1 are continuous, strictly monotonously increasing, bijective
and at least once continuously differentiable.
Since (1 (u)) = u for all u J, the Chain Rule 17 implies
d 1 d 1
0 (1 (u)) (u) = 1, i.e., (u) 6= 0 for all u J.
du du
Since (u) = (1 (u)), we know that (u) is continuously differentiable, and once
again by applying the Chain Rule 17 we get
d 1
0 (u) = 0 (1 (u)) (u) 6= 0 for all u J.
| {z } |du {z }
6=0
6=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 57
Arc Length
The length LP () of the polygonal chain ((t0 ), (t1 ), (t2 ), . . . , (tm )) that
corresponds to the decomposition t0 , t1 , t2 , . . . , tm is given by
m1
X
LP () := k(tj+1 ) (tj )k
j=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 58
Arc Length
Lemma 42
The arc length of a curve does not change for equivalent parameterizations.
Sketch of Proof : Suppose that (t) = ((t)) for all t I, for : J Rn . Every
decomposition t0 , t1 , t2 , . . . , tm of I maps to a decomposition (t0 ),(t1 ),(t2 ), . . . , (tm )
of J such that (ti ) = ((ti )) for all 1 i m. Hence, there is a bijection from the
set of decompositions of I to the set of decompositions of J, and it does not matter
which set is used for determining the supremum of all possible chain lengths.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 59
Arc Length: Non-Rectifiable Curve
I Curves exist that are non-rectifiable, i.e., for which there is no upper bound on the
length of their polygonal approximations.
I Example of a non-rectifiable curve: The graph of the function defined by f (0) := 0
and f (x) := x sin x1 for 0 < x a, for some a R+ . It defines a curve
t
(t) := f (t) .
1.0
0.5
- 0.5
- 1.0
1
The graph of f (x) := x sin x
for x [0, 2]
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 60
Arc Length: Non-Rectifiable Curve
I Curves exist that are non-rectifiable, i.e., for which there is no upper bound on the
length of their polygonal approximations.
I Example of a non-rectifiable curve: The graph of the function defined by f (0) := 0
and f (x) := x sin x1 for 0 < x a, for some a R+ . It defines a curve
t
(t) := f (t) .
0.2
0.1
- 0.1
- 0.2
1
for x [0, 12 ]
The graph of f (x) := x sin x
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 60
Arc Length: Non-Rectifiable Curve
I Curves exist that are non-rectifiable, i.e., for which there is no upper bound on the
length of their polygonal approximations.
I Example of a non-rectifiable curve: The graph of the function defined by f (0) := 0
and f (x) := x sin x1 for 0 < x a, for some a R+ . It defines a curve
t
(t) := f (t) .
0.006
0.004
0.002
- 0.002
- 0.004
- 0.006
1 1
The graph of f (x) := x sin x
for x [0, 32
]
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 60
Arc Length: Non-Rectifiable Curve
I Example of a non-rectifiable closed curve: The Koch snowflake [Koch 1904].
I The length of the curve after the n-th iteration is (4/3)n of the original triangle
perimeter. (Its fractal dimension is log 4/log 3 1.261.)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 61
Arc Length
Lemma 43
If : I Rn is a C 1 -curve then (I) is rectifiable.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 63
Arc Length
Theorem 46
Let : I Rn be a C 1 curve, with I := [a, b]. Then the arc length of (I) is given by
Z b
0
(u)
du.
a
Corollary 47
Let : I Rn be a C 1 curve, and [a, b] I. Then the arc length of ([a, b]) is
given by
Z b
0
(u)
du.
a
Theorem 49
If : I Rn , with I := [a, b], is a regular curve then there exists a
reparameterization that has unit speed.
Lemma 51
If : [0, c] Rn is an arc-length parameterization then it has constant (unit) speed
and the length of the arc of from (a) to (b) equals b a, for all 0 a < b c.
Proof : By Cor. 47, the length of the arc of from (a) to (b) is given by
Z b Z b
0
(t)
dt = 1 dt = b a.
a a
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 65
Tangent Vector
(t0 ) (t1 )
I If (t0 ) is a fixed point on the curve , and (t1 ), with t1 > t0 , is another point,
then the vector from (t0 ) to (t1 ) approaches the tangent vector to at (t0 ) as
the distance between t1 and t0 is decreased.
I The infinite line through (t0 ) that is parallel to this vector is known as the tangent
line to the curve at point (t0 ).
I If we disregard the orientation of the tangent vector then we would like to obtain
the same result for the tangent line by considering a point (t1 ) with t1 < t0 .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 66
Tangent Vector
I If (t) = (x(t), y (t)) is a curve in R2 then the vector (y 0 (t), x 0 (t)) is normal on
the tangent line at (t).
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 67
Frenet Frame for Curves in R3
Lemma 54
Let : I R3 be a C 2 curve that is regular of order two, and define T , N, B as in
Def. 53. We get for all t I:
I N(t) is normal to T (t), and
I B(t) is a unit vector.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 68
Osculating Plane for a Curve in R3
I Let (t0 ) be a fixed point on , and two other points (t1 ) and (t2 ) that move
along .
I Obviously, (t0 ), (t1 ) and (t2 ) define a plane.
I As both (t1 ) and (t2 ) approach (t0 ), the plane determined by them
approaches a limiting position.
I This limiting plane is known as the osculating plane to the curve at point (t0 ).
Definition 55 (Osculating plane, Dt.: Schmiegeebene)
Let : I R3 be a C 2 curve that is regular of order two. The osculating plane at the
point (t) is the plane spanned by T (t) and N(t), as defined in Def. 53.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 69
Parametric Continuity of a Curve
I Consider two curves : [a, b] Rn and : [c, d] Rn .
I Suppose that (b) = (c) =: p.
I We are interested in checking how smoothly and joint at the point p.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 70
Parametric Continuity of a Curve
I C 0 -continuity implies that the end point of one curve is the start point of the
second curve, i.e., they share a common joint.
I C 1 -continuity implies that the speed does not change at p.
I C 2 -continuity implies that the acceleration does not change at p.
I Parametric continuity is important for animations: If an object moves along with
constant parametric speed, then there should be no sudden jump once it moves
along .
Definition 57 (Curvature continuous, Dt.: krmmungsstetig)
Let : [a, b] R3 and : [c, d] Rn be C 2 -curves, with (b) = (c) =: p. If the
curvatures of and are equal at p then and are said to be curvature
continuous at p.
Caveat
C 1 -continuity plus curvature continuity need not imply C 2 -continuity!
I Unfortunately, this important fact is missed frequently, and curvature continuity is
often (wrongly) taken as a synonym for C 2 -continuity . . .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 71
Problems with Parametric Continuity
I Note that parametric continuity depends on the particular parameterizations of
and .
I Consider three collinear points p, q, and r which define two straight-line
segments joined at their common endpoint q:
(t) := p + t(q p), t [0, 1]
(t) := q + (t 1)(r q), t [1, 2]
p q r
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 72
Geometric Continuity
I G0 -continuity equals C 0 -continuity: The curves and share a common joint p.
Definition 58 (G 1 -continuous, Dt.: G 1 stetig)
Let : [a, b] Rn and : [c, d] Rn be C 1 -curves, with (b) = (c) =: p. If
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 73
Parametric Surface in R3
I For instance, every point on the surface of Earth can be described by the
geographic coordinates longitude and latitude.
I Note that parameterizations of a surface (regarded as a set S R3 ) need not be
unique: two different parameterizations and may exist such that
S = (1 ) = (2 ).
I For simplicity, we will not distinguish between a surface and one of its
parameterizations if the meaning is clear.
(u, v)
()
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 75
Sample Parametric Surface: Frustum of a Paraboloid
: [0, 1] [0, 2] R3
u cos v
(u, v ) := u sin v
2u 2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 76
Sample Parametric Surface: Torus
: [0, 2]2 R3
(2 + cos v ) cos u
(u, v ) := (2 + cos v ) sin u
sin v
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 77
Basic Definitions for Parametric Surfaces
I Note that u
(u0 , v0 ) and v
(u0 , v0 ) are linearly independent if and only if
(u0 , v0 ) (u0 , v0 ) 6= 0.
u v
Definition 61 (Singular point, Dt.: singulrer Punkt)
Let R2 . A point (u0 , v0 ) is a singular point of a differentiable
parameterization : R3 if u
(u0 , v0 ) and
v
(u0 , v0 ) are linearly dependent.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 78
Curves on Surfaces
I Consider a planar parametric C 1 curve with coordinates (u(t), v (t)), for
t I R, in the parametric domain of a parametric surface : R3 .
Then : I R3 with (t) := u(t), v (t) is a parametric curve on the surface
I
().
I Suppose that is differentiable on . Differentiating (t) (by means of a
multi-dimensional analogue of the Chain Rule 17) with respect to t yields the
tangent vector of the curve on the surface:
0 (t) = (u(t), v (t)) u 0 (t) + (u(t), v (t)) v 0 (t)
u v
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 79
Curves on Surfaces
I Suppose that = [umin , umax ] [vmin , vmax ]
I If we fix v := v0 [vmin , vmax ] and let u vary, then (u, v0 ) depends on one
parameter; it is called an isoparametric curve or, more specifically, the
u-parameter curve.
I Likewise, we can fix u := u0 [umin , umax ] and let v vary to obtain the
v -parameter curve (u0 , v ).
I Tangent vectors for the u-parameter and v -parameter curves are computed by
partial derivatives of with respect to u and v , respectively:
(u, v ) for v = v0
u
(u, v ) for u = u0
v
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 80
Curves on Surfaces
I The parameterization of the unit sphere is given by
cos u cos v
(u, v ) := sin u cos v with (u, v ) [0, 2[[ , ].
2 2
sin v
I We get
sin u cos v0
(u, v0 ) = cos u cos v0
u
0
and
cos u0 sin v
(u0 , v ) = sin u0 sin v .
v
cos v
I Note that u
(u0 , v0 )
v
(u0 , v0 ).
I Also, for v0 := 2 . Hence, the north and south
note that u (u, v0 ) vanishes
poles are singular points of this parameterization.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 81
Tangent Plane and Normal Vector
I Recall that the tangent vector at a point (t) of a parametric curve on a surface
() is given by partial derivatives of . This motivates the following definition.
Definition 62 (Tangent plane, Dt.: Tangentialebene)
Consider a regular parameterization : R3 of a surface S. For (u, v ) , the
tangent plane (u, v ) of S at (u, v ) is the plane through (u, v ) that is spanned by
the vectors
(u, v ) and (u, v ).
u v
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 82
Bzier Curves and Surfaces
Bernstein Basis Polynomials
Bzier Curves
Bzier Surfaces
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 83
Bernstein Basis Polynomials
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 85
Bernstein Basis Polynomials
I All Bernstein basis polynomials of degree n = 0 over the interval [0, 1]:
1.0
0.8
0.6
0.4
0.2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 86
Bernstein Basis Polynomials
I All Bernstein basis polynomials of degree n = 1 over the interval [0, 1]:
1x x
1.0
0.8
0.6
0.4
0.2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 86
Bernstein Basis Polynomials
I All Bernstein basis polynomials of degree n = 2 over the interval [0, 1]:
(1 x)2 2x(1 x) x2
1.0
0.8
0.6
0.4
0.2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 86
Bernstein Basis Polynomials
I All Bernstein basis polynomials of degree n = 3 over the interval [0, 1]:
1.0
0.8
0.6
0.4
0.2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 86
Bernstein Basis Polynomials
I All Bernstein basis polynomials of degree n = 4 over the interval [0, 1]:
1.0
0.8
0.6
0.4
0.2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 86
Bernstein Basis Polynomials
I All Bernstein basis polynomials of degree n = 5 over the interval [0, 1]:
1.0
0.8
0.6
0.4
0.2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 86
Recursion Formula for Bernstein Basis Polynomials
Lemma 65
For all n N and k N0 with k n, the Bernstein basis polynomial Bk ,n (x) of
degree n can be written as the sum of two basis polynomials of degree n 1:
Proof : Let n N and k N0 with k n be arbitrary but fixed, and recall that
! ! ! !
def n k nk n n1 n1
Bk ,n (x) = x (1 x) and = + .
k k k 1 k
We get
! !
n1 k nk n1 k
Bk ,n (x) = x (1 x) + x (1 x)nk
k 1 k
! !
n 1 k 1 (n1)(k 1) n1 k
=x x (1 x) + (1 x) x (1 x)(n1)k
k 1 k
= x Bk 1,n1 (x) + (1 x) Bk ,n1 (x).
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 87
Properties of Bernstein Basis Polynomials
Lemma 66
For all n N and k N0 with k n, the Bernstein basis polynomial Bk ,n1 can be
written as linear combination of Bernstein basis polynomials of degree n:
nk k +1
Bk ,n1 (x) = Bk ,n (x) + Bk +1,n (x).
n n
Lemma 67
For all n, k N0 with k n, the Bernstein basis polynomial Bk ,n is non-negative
over the unit interval:
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 88
Properties of Bernstein Basis Polynomials
Proof : Trivial for n = 0. Now recall the binomial theorem, for a, b R and n N:
n
!
n
X n k nk
(a + b) = a b
k
k =0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 89
Properties of Bernstein Basis Polynomials
Lemma 69
For all n N0 and any set of n + 1 points in R2 with position vectors
p0 , p1 , p2 , . . . , pn , the term
Proof : Recall that CH({p0 , p1 , p2 , . . . , pn }) equals the set of all convex combinations
of p0 , p1 , p2 , . . . , pn .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 90
Derivatives of Bernstein Basis Polynomials
Lemma 71
For n, k N0 and i N with i n, the i-th derivative of Bk ,n (x) can be written as a
linear combination of Bernstein basis polynomials of degree n i:
i
!
(i) n! X i
Bk ,n (x) = (1)ij Bk j,ni (x)
(n i)! j
j=0
Corollary 72
For n, k N0 , the first and second derivative of Bk ,n (x) are given as follows:
Bk00,n (x) = n(n 1) Bk 2,n2 (x) 2Bk 1,n2 (x) + Bk ,n2 (x)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 91
Bernstein Basis Polynomials Form a Basis
Lemma 73
The n + 1 Bernstein basis polynomials B0,n , B1,n , . . . , Bn,n are linearly independent,
for all n N0 .
Lemma 74
For all n, i N0 , with i n, we have
X n k
i i
x = n Bk ,n (x).
k =i i
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 93
Bernstein Basis Polynomials Form a Basis
Lemma 75
For all n, k , i N0 , with i k n,
ni
k
k i i
n
= n .
k i
Theorem 76
The Bernstein basis polynomials of degree n form a basis of the vector space of
polynomials of degree up to n over R, for all n N0 .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 94
Basis Conversions
I Suppose that we are given a polynomial in Bernstein basis, i.e., a Bernstein
polynomial as a linear combination of Bernstein basis polynomials, and that we
want to find the equivalent in power basis, and vice versa.
I Bernstein basis: I Power basis:
n
X n
X
Bn (x) = k Bk ,n (x) Pn (x) = k x k
k =0 k =0
I Given either the values for k or k , we want to find the corresponding values in
the other basis.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 95
Basis Conversions Using Taylor Series Expansion
I Basis conversions between power and Bernstein basis can be done using
Taylor/Maclaurin series expansion:
(i)
Bn00 (0)x 2 B (0)x i
Bn (x) = Bn (0) + Bn0 (0)x + + ... + n + ...
2 i!
I Thus,
(i)
Bn (0)
i = i = 0, 1, . . . , n.
i!
I One can set up a recurrence formula for computing i .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 96
Basis Conversions Using the Binomial Theorem
I The appropriate values of i can also be computed directly based on the
definition of the Bernstein polynomials and the Binomial Theorem:
! !
n k n k
Bk ,n (x) = x (1 x)nk = x (1)nk (x 1)nk
k k
! nk
!
n k X nk
= x (1) nk
x i (1)nk i
k i
i=0
! nk ! nk
! !
n k X nk X n nk
= x (1)i x i = (1)i x i+k
k i k i
i=0 i=0
n
! ! n
! !
X ik n nk i Lem 75
X ik n i
= (1) x = (1) xi
k i k i k
i=k i=k
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 97
Bzier Curves
I Discovered in the late 1950s by Paul de Casteljau at Citron and in the early
1960s by Pierre E. Bzier at Renault, and first published by Bzier in 1962.
(Citron allowed de Casteljau to publish his results in 1974 for the first time.)
I The idea is to specify a curve by using points which control its shape: control
points. The figure shows a Bzier curve of degree 10 with 11 control points.
p9 p8
p2 p7
p3 p10
p6
p1 p5
p4
p0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 99
Bzier Curves
n
i
where Bi,n (t) = i
t (1 t)ni is the i-th Bernstein basis polynomial of degree n.
I The weighted average of all control points gives a location on the curve relative to
the parameter t. The weights are given by the coefficients Bi,n .
I The polygonal chain p0 , p1 , p3 , . . . , pn1 , pn is called the control polygon, and its
individual segments are referred to as legs.
I Although not explicitly required, it is generally assumed that the control points are
distinct, except for possibly p0 and pn being identical.
I Of course, the same definition and the subsequent math can be applied to
p0 , p1 , . . . , pn Rd for some d N with d > 2.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 100
Properties of Bzier Curves
Lemma 78
A Bzier curve defined by n + 1 control points is (coordinate-wise) a polynomial of
degree n.
Hence, B(0) = B0,n (0)p0 = p0 . Similarly for Bi,n (1) and B(1).
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 101
Properties of Bzier Curves
Sketch of Proof : Recall that all points of a Bzier curve are given by convex (i.e.,
affine) combinations of the control points.
Lemma 83 (Symmetry property )
The following identity holds:
n
X n
X
Bi,n (t)pi = Bi,n (1 t)pni .
i=0 i=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 102
Modifying a Control Point
I Suppose that we shift one control point pj to a new location pj + v .
p9 p8
p2 p3 p7
p10
p6
p1
p5
p4
p0 v
p4 + v
I The corresponding Bzier curve B is transformed to B? as follows:
j1
! n
?
X X
B (t) = Bi,n (t)pi + Bj,n (t)(pj + v ) + Bi,n (t)pi =
i=0 i=j+1
n
X
= Bi,n (t)pi + Bj,n (t)v = B(t) + Bj,n (t)v
i=0
I Now recall that Bj,n (t) 6= 0 for all t with 0 < t < 1. Hence, a modification of just
one control point results in a global change of the entire Bzier curve.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 103
Evaluation of a Bzier Curve
I For 0 < t < 1 we can locate a point q on a line segment pr such that it divides
the line segment into portions of relative length t and 1 t, i.e., according to the
ratio t : 1 t.
I Of course, q is given by
q = (1 t)p + tr .
I Similarly, we can compute a point on a Bzier curve such that the curve is split
into portions of relative length t and 1 t.
I On every leg p
j1 pj of the control polygon we compute a point p1j which
divides it according to the ratio t : 1 t.
I In total we get n new points which define a new polygonal chain with n 1
legs.
I This new polygonal chain can be used to construct another polygonal chain
with n 2 legs.
I This process can be repeated n times, i.e., until we are left with a single
point.
I It was proved by de Casteljau that this point corresponds to the point B(t)
sought.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 104
De Casteljaus Algorithm
I Sample run of de Casteljaus algorithm for t := 1/4.
I The points are indexed in the form i, j, where i denotes the number of the
iteration and j + 1 denotes the leg defined by the control points pi,j and pi,j+1 .
p2 p3
p1 p5
p0 p4
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 105
De Casteljaus Algorithm
I Sample run of de Casteljaus algorithm for t := 1/4.
I The points are indexed in the form i, j, where i denotes the number of the
iteration and j + 1 denotes the leg defined by the control points pi,j and pi,j+1 .
p2 p3
p0 =: p00
p1 p1 =: p01 p5
p2 =: p02
p3 =: p03
p4 =: p04
p0 p5 =: p05 p4
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 105
De Casteljaus Algorithm
I Sample run of de Casteljaus algorithm for t := 1/4.
I The points are indexed in the form i, j, where i denotes the number of the
iteration and j + 1 denotes the leg defined by the control points pi,j and pi,j+1 .
p2 p3
p12
p13
p11
p0 =: p00
p10 p5
p1 p1 =: p01
p11
p2 =: p02
p12
p3 =: p03
p10 p13
p4 =: p04 p14
p0 p14 p4
p5 =: p05
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 105
De Casteljaus Algorithm
I Sample run of de Casteljaus algorithm for t := 1/4.
I The points are indexed in the form i, j, where i denotes the number of the
iteration and j + 1 denotes the leg defined by the control points pi,j and pi,j+1 .
p2 p22 p3
p12
p13
p21
p23
p11
p0 =: p00
p10 p5
p1 p1 =: p01 p20
p11
p2 =: p02 p21
p20 p12
p3 =: p03 p22
p10 p13
p4 =: p04 p23 p14
p0 p14 p4
p5 =: p05
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 105
De Casteljaus Algorithm
I Sample run of de Casteljaus algorithm for t := 1/4.
I The points are indexed in the form i, j, where i denotes the number of the
iteration and j + 1 denotes the leg defined by the control points pi,j and pi,j+1 .
p2 p22 p3
p12
p32 p13
p31
p21
p23
p11
p0 =: p00
p10 p5
p1 p1 =: p01 p20
p30 p11 p30
p2 =: p02 p21
p20 p12 p31
p3 =: p03 p22
p10 p13 p32
p4 =: p04 p23 p14
p0 p14 p4
p5 =: p05
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 105
De Casteljaus Algorithm
I Sample run of de Casteljaus algorithm for t := 1/4.
I The points are indexed in the form i, j, where i denotes the number of the
iteration and j + 1 denotes the leg defined by the control points pi,j and pi,j+1 .
p2 p22 p3
p12
p32 p13
p31 p41
p21
p23
p11
p40 p0 =: p00
p10 p5
p1 p1 =: p01 p20
p30 p11 p30
p2 =: p02 p21 p40
p20 p12 p31
p3 =: p03 p22 p41
p10 p13 p32
p4 =: p04 p23 p14
p0 p14 p4
p5 =: p05
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 105
De Casteljaus Algorithm
I Sample run of de Casteljaus algorithm for t := 1/4.
I The points are indexed in the form i, j, where i denotes the number of the
iteration and j + 1 denotes the leg defined by the control points pi,j and pi,j+1 .
p2 p22 p3
p12
p32 p13
p31 p41
p21
p23
p11 p50
p40 p0 =: p00
p10 p5
p1 p1 =: p01 p20
p30 p2 p11 p30
=: p02 p21 p40
p20 p12 p31 p50
p3 =: p03 p22 p41
p10 p13 p32
p4 =: p04 p23 p14
p0 p14 p4
p5 =: p05
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 105
De Casteljaus Algorithm
I Numerically very stable, since only convex combinations are used!
p0 =: p00
p10
p1 =: p01 p20
p11 p30
p2 =: p02 p21 p40
p12 p31 p50
p3 =: p03 p22 p41
p13 p32
p4 =: p04 p23
p14
p5 =: p05
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 106
De Casteljaus Algorithm: Correctness
t(1 t)p01 .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 107
De Casteljaus Algorithm: Correctness
t i (1 t)ni p0i ,
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 108
De Casteljaus Algorithm: Correctness
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 109
Evaluation of a Bzier Curve Using Horners Scheme
I Horners scheme can also be used for evaluating a Bzier curve.
I After rewriting B(t) as
n n
!
X X n i
B(t) = Bi,n (t)pi = t (1 t)ni pi
i
i=0 i=0
n
! i !
n
X n t
= (1 t) pi ,
i 1t
i=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 110
Bernstein Polynomials and Polar Forms
Theorem 84
Let n, d N. For every polynomial function F : R Rd there exists exactly one
symmetric and multi-affine function f : Rn Rd , which is called the polar form (aka
blossom, Dt.: Polarform) of F , such that
1. for all i {1, 2, . . . , n}, all xP
1 , x2 , . . . , xn R, all k N, all y1 , y2 , . . . , yk R and
all 1 , 2 , . . . , k R with kj=1 j = 1
k
X k
X
f (x1 , x2 , . . . , xi1 , j yj , xi+1 , . . . , xn ) = j f (x1 , x2 , . . . , xi1 , yj , xi+1 , . . . , xn )
j=1 j=1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 111
Bernstein Polynomials and Polar Forms
Lemma 85
Pn
Let n N and a0 , a1 , . . . , an R, and F (x) := i=0 ai x i . Then f : Rn R
n
X 1 X Y
f (x1 , x2 , . . . , xn ) := ai
n xj
i=0 i I{1,...,n} jI
|I|=i
ai F (x) f (x1 , . . . , xn )
n=1 a0 := 1, a1 := 0 1 1
a0 := 0, a1 := 1 x x1
n=2 a0 := 1, a1 := 0, a2 := 0 1 1
1
a0 := 0, a1 := 1, a2 := 0 x 2
(x1 + x2 )
a0 := 0, a1 := 0, a2 := 1 x2 x1 x2
n=3 a0 := 1, a1 := 0, a2 := 0, a3 := 0 1 1
1
a0 := 0, a1 := 1, a2 := 0, a3 := 0 x 3
(x 1 + x2 + x3 )
a0 := 0, a1 := 0, a2 := 1, a3 := 0 x2 1
3
(x1 x 2 + x 1 x3 + x2 x3 )
a0 := 0, a1 := 0, a2 := 0, a3 := 1 x3 x1 x2 x3
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 112
Bernstein Polynomials and Polar Forms
1 (x +x )
x
2 1 2
I Let F (x) := 1 x2 . Hence f (x1 , x2 ) = 1x x , and we get
2 2 1 2
! ! !
1
0 2 1
f (0, 0) = f (0, 1) = = f (1, 0) f (1, 1) = 1 .
0 0 2
I Hence, there is a close connection between the polar form and the Bernstein
polynomials: f (0, 0), f (0, 1), f (1, 1) form the coefficients (i.e., control points) of F
relative to the Bernstein basis.
I Polar forms are useful because they provide a uniform and simple means for
computing values of a polynomial using a variety of representations (Bzier,
B-spline, NURBS, etc.).
I For this reason, some authors prefer to introduce Bzier curves in their polar
form.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 113
Bernstein Polynomials and Polar Forms
Lemma 86
Every polynomial can be expressed in Bezier form. That is, for every polynomial
P : R R2 of degree n there exist control points p0 , p1 , . . . , pn R2 such that the
Bzier curve defined by them matches P|[0,1] .
pk := f (0, . . . , 0, 1, . . . , 1) for k = 0, 1, . . . , n.
| {z } | {z }
nk k
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 114
Geometric Interpretation of Polar Forms
1 (x +x )
x
2 1 2
I Let F (x) := 1 x2 , and t := 0.6. Recall that f (x1 , x2 ) = 1x x .
2 2 1 2
I We get:
! ! !
1
1
2
t 2
+ 21 t t
f (t, 0) = f (1, t) = 1
f (t, t) = 1 2
0 2
t 2
t
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 115
Derivatives of a Bzier Curve
Lemma 87
Let B be a Bzier curve of degree n with n + 1 control points p0 , p1 , . . . , pn . Its first
derivative, which is sometimes called hodograph, is a Bzier curve of degree n 1,
n1
X
B0 (t) = Bi,n1 (t)(n(pi+1 pi )),
i=0
Proof : Since the control points are constants, computing the derivative of a Bzier
curve is reduced to computing the derivatives of the Bernstein basis polynomials.
n
! n n
!
0 d X X 0 Cor . 72
X
B (t) = Bi,n (t)pi = Bi,n (t)pi = n (Bi1,n1 (t) Bi,n1 (t))pi
dt
i=0 i=0 i=0
n n1
!
X X
=n Bi1,n1 (t)pi Bi,n1 (t)pi
i=1 i=0
n1 n1
! n1
X X X
=n Bi,n1 (t)pi+1 Bi,n1 (t)pi = Bi,n1 (t)(n(pi+1 pi ))
i=0 i=0 i=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 116
Derivatives of a Bzier Curve
Lemma 88
A Bzier curve is tangent to the control polygon at the endpoints.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 117
Subdivision of a Bzier Curve
I One can subdivide an n-degree Bzier curve B into two curves, at a point B(t0 )
for a given parameter t0 , such that the newly obtained Bzier curves B1 and B2
have their own set of control points and are of degree n each:
I First, we use de Casteljaus algorithm to compute B(t ).
0
I The subdivided control polygon can then be used to generate the new
p2 p22 p3
p12
p32 p13
p31 p41
p21
p23
p11 p50
p40 p0 =: p00
p10 p5
p1 p1 =: p01 p20
p30 p2 p11 p30
=: p02 p21 p40
p20 p12 p31 p50
p3 =: p03 p22 p41
p10 p13 p32
p4 =: p04 p23 p14
p0 p14 p4
p5 =: p05
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 118
Subdivision of a Bzier Curve
Lemma 89
Let p0 , p1 , . . . , pn be the control points of the Bzier curve B, and let pi,j denote the
control points obtained by de Casteljaus algorithm for some t0 ]0, 1[. We define
new control points as follows:
Let B? (B?? , resp.) denote the Bzier curve defined by p0? , p1? , . . . , pn?
(p0?? , p1?? , . . . , pn?? , resp.). Then B? and B?? join in a tangent-continuous way at point
pn? = p0?? , and we have
I Note: With every subdivision the control polygons get closer to the Bzier curve.
And the approximation is very fast: For k subdivision steps, the maximum
distance between the control polygons and the curve is
c
< for some positive constant c.
2k
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 119
Degree Elevation of a Bzier Curve
I An increase of the number of control points of a Bzier curve increases the
flexibility in designing shapes.
I The key goal is to preserve the shape of the curve. (Recall that Bzier curves
change globally if one control point is relocated!)
I Of course, adding one control point means increasing the degree of a Bzier
curve by one.
I Let p0 , p1 , . . . , pn be the old control points, and p0? , p1? , . . . , pn? , pn+1
?
be the new
control points, and denote the Bzier curves defined by them by B and B? .
I How can we guarantee B(t) = B? (t) for all t [0, 1]?
I Obviously, we will need
p0 = p0? ?
and pn = pn+1
in order to ensure that at least the start and end points of B and B? match.
I In the sequel, we will find it convenient to extend the index range of the control
points of B and introduce (arbitrary) points p1 and pn+1 . (Both points will be
multiplied with factors that equal zero, anyway.)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 120
Degree Elevation of a Bzier Curve
I Standard equalities:
! ! !
n+1 n+1 n i
(1 t) Bi,n = (1 t) t (1 t)ni
i i i
! ! !
n n+1 i n
= t (1 t)n+1i = Bi,n+1
i i i
and
! ! !
n+1 n+1 n i
t Bi,n = t t (1 t)ni
i +1 i +1 i
! ! !
n n + 1 i+1 n
= t (1 t)ni = Bi+1,n+1
i i +1 i
I Hence,
n+1i i +1
(1 t) Bi,n = Bi,n+1 , and t Bi,n = Bi+1,n+1 .
n+1 n+1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 121
Degree Elevation of a Bzier Curve
n
X n
X
B(t) = Bi,n (t)pi = ((1 t) + t) Bi,n (t)pi
i=0 i=0
n
X n
X n
X n
X
= (1 t) Bi,n (t)pi + t Bi,n (t)pi = (1 t) Bi,n (t)pi + t Bi,n (t)pi
i=0 i=0 i=0 i=0
n n
X n+1i X i +1
= Bi,n+1 (t)pi + Bi+1,n+1 (t)pi
n+1 n+1
i=0 i=0
n+1 n
X n+1i X i +1
= Bi,n+1 (t)pi + Bi+1,n+1 (t)pi
n+1 n+1
i=0 i=1
n+1 n+1
X n+1i X i
= Bi,n+1 (t)pi + Bi,n+1 (t)pi1
n+1 n+1
i=0 i=0
n+1 n+1
X i n+1i X
= Bi,n+1 (t) pi1 + pi = Bi,n+1 (t)pi? =: B? (t)
n+1 n+1
i=0 i=0
with
i n+1i
pi? := pi1 + pi , i = 0, . . . , n + 1.
n+1 n+1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 122
Degree Elevation of a Bzier Curve
Lemma 90
Let p0 , p1 , . . . , pn be the control points of the degree-n Bzier curve B. If we use
i i
pi? := pi1 + 1 pi for i = 0, 1, , n + 1
n+1 n+1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 123
Degree Elevation of a Bzier Curve
I Note that all newly created control points lie on the edges of the previous control
polygon.
I Effectively, the corners of the previous control polygon are cut off.
I Degree elevation can be used repeatedly, e.g., in order to arrive at the same
degrees for two Bzier curves that join.
I As the degree keeps increasing, the control polyon approaches the Bzier curve
and has it as a limiting position.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 124
Bzier Surfaces
d
k
where Bk ,d (x) = k
x (1 x)dk is the k -th Bernstein basis polynomial of degree
d.
I Since Bi,n (u) and Bj,m (v ) are polynomials of degree n and m, this is called a
Bzier surface of degree (n, m).
I The set of control points is called a Bzier net or control net.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 126
Properties of Bzier Surfaces
Lemma 92
For all n, m N0 and all 0 i n and 0 j m, and all (u, v ) [0, 1] [0, 1], the
term Bi,n (u)Bj,m (v ) is non-negative.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 127
Properties of Bzier Surfaces
Proof : Recall that S(u, v ) is the linear combination of all its control points with
non-negative coefficients whose sum is one.
Lemma 95
A Bzier surface passes through the four corners p0,0 , pn,0 , p0,m and pn,m .
Hence, S(0, 0) = B0,n (0)B0,m (0)p0,0 = p0,0 . Similarly for the other corners.
Lemma 96
Applying an affine transformation to the control points results in the same
transformation as obtained by transforming the surfaces equation.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 128
Isoparametric Curves of Bzier Surfaces
Lemma 97
Consider a Bzier surface S : [0, 1] [0, 1] R3 defined by (n + 1) (m + 1)
control points pi,j , with 0 i n and 0 j m, and let v0 [0, 1] be fixed. Then
C : [0, 1] R3 defined as
n X
X m
C(u) := Bi,n (u)Bj,m (v0 )pi,j for u [0, 1]
i=0 j=0
Corollary 98
The boundary curves of a Bzier surface are Bzier curves defined by the
boundary points of its control net.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 130
Bzier Surface as Tensor-Product Surface
I A Bzier surface is generated by multiplying two Bzier curves: tensor product
surface.
Lemma 100
Consider a Bzier surface S : [0, 1] [0, 1] R3 defined by (n + 1) (m + 1) control
points pi,j , with 0 i n and 0 j m. Then S is a tensor-product surface:
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 131
B-Spline Curves and Surfaces
Shortcomings of Bzier Curves
B-Spline Basis Functions
B-Spline Curves
B-Spline Surfaces
Non-Uniform Rational B-Spline Curves and Surfaces
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 132
Shortcomings of Bzier Curves
I Modifying the vertex pj of a Bzier curve causes a global change of the entire
curve:
p9 p8
p2 p3 p7
p10
p6
p1
p5
p4
p0 v
p4 + v
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 134
Shortcomings of Bzier Curves
I While it is easy to join two Bzier curves with G1 continuity, achieving C 2 or even
higher continuity is quite cumbersome.
p3
p1
p2 , p3 = p0 , p1 collinear
p1
p0 p3 = p0
p2 p2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 135
Shortcomings of Bzier Curves
I While it is easy to join two Bzier curves with G1 continuity, achieving C 2 or even
higher continuity is quite cumbersome.
I Even worse, changing the common end point of two consecutive Bzier curves
destroys G1 continuity.
p3
p1
p1
p3 = p0
p0
p2 p2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 135
Shortcomings of Bzier Curves
I While it is easy to join two Bzier curves with G1 continuity, achieving C 2 or even
higher continuity is quite cumbersome.
I This will be easier for B-spline curves. (Depicted are two cubic B-splines.)
p3
p1
p1
p0 p3 = p0
p2 p2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 136
Shortcomings of Bzier Curves
I While it is easy to join two Bzier curves with G1 continuity, achieving C 2 or even
higher continuity is quite cumbersome.
I This will be easier for B-spline curves. (Depicted are two cubic B-splines.)
p3
p1
p1 p3 = p0
p0
p2 p2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 136
Shortcomings of Bzier Curves
I It is fairly difficult to squeeze a Bzier curve close to a sharp corner of the control
polygon.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 137
Shortcomings of Bzier Curves
I Adding additional control vertices hardly helps but increases the degree of the
Bzier curve, which may result in oscillation and cause numerical instability.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 137
Introduction to B-Splines
I Curves consisting of just one segment have several drawbacks:
I To satisfy all given constraints, often a high polynomial degree is required.
Warning
The terminology and the definitions used for B-splines vary from author to author!
Thus, make sure to check carefully the definitions given in textbooks or research
papers.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 139
Introduction to B-Splines
P4 (t)
C(t) P3 (t)
P1 (t)
P2 (t) P5 (t)
a = t0 t1 t2 t3 t4 t5 = b
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 140
Introduction to B-Splines
I The numbers t0 , ..., tm are called breakpoints or knots.
I The definition implies
I The polynomials join with some unknown degree of continuity at the breakpoints.
(We have at least C 0 -continuity.)
I Obvious problem: How can we achieve a reasonable degree of continuity?
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 141
Knot Vector
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 143
B-Spline Basis Functions
I We define the B-spline basis functions analytically, using the recurrence formula
by de Boor, Cox and Mansfield.
Definition 105 (B-spline basis function)
Let be a finite or (bi)infinite knot vector. For all (permissible) i Z and k N0 , the
i-th B-spline basis function, Ni,k , (t), of degree k (and order k + 1) relative to is
defined as,
if k = 0,
1 if ti t < ti+1 ,
Ni,0, (t) =
0 otherwise,
and if k > 0 as
t ti ti+k +1 t
Ni,k , (t) = Ni,k 1, (t) + Ni+1,k 1, (t).
ti+k ti ti+k +1 ti+1
0
I In case of multiple knots, indeterminate terms of the form 0
are taken as zero!
I Alternatively, one can demand ti < ti+k for all (permissible) i Z.
I Aka: Normalized B(asic)-Spline Blending Functions.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 144
B-Spline Basis Functions
I Plugging into the definition yields
t ti ti+2 t
Ni,1, (t) = Ni,0, (t) + Ni+1,0, (t)
ti+1 ti ti+2 ti+1
0 if t 6 [ti , ti+2 [,
tti
= ti+1 ti
if t [ti , ti+1 [,
ti+2 t
if t [ti+1 , ti+2 [.
t t
i+2 i+1
I The functions Ni,1, are called hat functions or chapeau functions. They are
widely used in signal processing and finite-element techniques.
I Note that Ni,1, is continuous at ti+1 .
I For a uniform knot vector with c := ti+1 ti this simplifies to
0 if t 6 [ti , ti+2 [,
1
Ni,1, (t) = c
(t ti ) if t [ti , ti+1 [,
1
(t t)
c i+2
if t [ti+1 , ti+2 [.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 145
B-Spline Basis Functions
I Basis functions Ni,k , .
1
N1,0 Ni,0 is a step function that is 1 in
the interval [ti , ti+1 [
t0 t1 t2 t3 t4 t5
1
N1,1 Ni,1 is a piecewise linear function
that is non-zero on two knot spans
[ti , ti+2 [ and goes from 0 to 1 and
t0 t1 t2 t3 t4 t5 back
1
N1,2 Ni,2 is a piecewise quadratic
function that is non-zero on three
knot spans [ti , ti+3 [
t0 t1 t2 t3 t4 t5
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 146
Sample B-Spline Basis Functions
I Basis functions of degree 0:
1 1
N0,0 N1,0
t0 t1 t2 t3 t4 t5 t0 t1 t2 t3 t4 t5
1 1
N2,0 N3,0
t0 t1 t2 t3 t4 t5 t0 t1 t2 t3 t4 t5
1 1
N4,0
t0 t1 t2 t3 t4 t5 t0 t1 t2 t3 t4 t5
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 147
Sample B-Spline Basis Functions
I Basis functions of degree 1:
1 1
N0,1 N1,1
t0 t1 t2 t3 t4 t5 t0 t1 t2 t3 t4 t5
1 1
N2,1 N3,1
t0 t1 t2 t3 t4 t5 t0 t1 t2 t3 t4 t5
t0 t1 t2 t3 t4 t5
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 147
Sample B-Spline Basis Functions
I Basis functions of degree 2:
1 1
N0,2 N1,2
t0 t1 t2 t3 t4 t5 t0 t1 t2 t3 t4 t5
1
N2,2
t0 t1 t2 t3 t4 t5
t0 t1 t2 t3 t4 t5
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 147
Sample B-Spline Basis Functions
I Uniform knot vector (0, 19 , 92 , 39 , 49 , 95 , 69 , 79 , 98 , 1) with ten knots.
1.0 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
N0,0 , N1,0 , N2,0 , N6,0 , N7,0 , N8,0 N0,1 , N1,1 , N2,1 , N5,1 , N6,1 , N7,1
1.0 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
N0,0
N0,1
N1,0 N0,2
N1,1 N0,3
N2,0 N1,2 N0,4
N2,1 N1,3
N3,0 N2,2
N3,1
N4,0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 151
Properties of B-Spline Basis Functions
I It is common to omit the explicit mentioning of the dependency of Ni,k , on , and
to write simply Ni,k .
I For k > 0, each Ni,k , (t) is a linear combination of two B-spline basis functions of
degree k 1: Ni,k 1, (t) and Ni+1,k 1, (t).
I Ni,k , (t) depends on Ni,0, (t), Ni+1,0, (t), . . . , Ni+k ,0, (t).
N0,0 Ni,k
N0,1
N1,0 N0,2
N1,1 N0,3
N2,0 N1,2 N0,4
N2,1 N1,3
N3,0 N2,2
N3,1
N4,0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 151
Properties of B-Spline Basis Functions
I It is common to omit the explicit mentioning of the dependency of Ni,k , on , and
to write simply Ni,k .
I For k > 0, each Ni,k , (t) is a linear combination of two B-spline basis functions of
degree k 1: Ni,k 1, (t) and Ni+1,k 1, (t).
I Ni,k , (t) is non-zero only for t [ti , ti+k +1 [.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 151
Properties of B-Spline Basis Functions
Ni,k , (t) = 0 if t
/ [ti , ti+k +1 [.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 152
Properties of B-Spline Basis Functions
0.
Lemma 108
All B-spline basis functions are right-side continuous.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 153
Properties of B-Spline Basis Functions
Lemma 109
Let := (. . . , t2 , t1 , t0 , t1 , t2 , . . .) be a (bi)infinite knot vector. For all (permissible)
i Z and k N0 , the basis functions
are the only (at most) k + 1 basis functions of degree k that are (possibly) non-zero
over the interval [ti , ti+1 [.
[t0 , t1 [ N0,0
N0,1
[t1 , t2 [ N1,0 N0,2
N1,1 N0,3
[t2 , t3 [ N2,0 N1,2 N0,4
N2,1 N1,3
[t3 , t4 [ N3,0 N2,2
N3,1
[t4 , t5 [ N4,0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 154
Properties of B-Spline Basis Functions
Lemma 110
Let := (. . . , t2 , t1 , t0 , t1 , t2 , . . .) be a (bi)infinite knot vector. For all (permissible)
i Z and k N0 , the basis functions
are the only (at most) k + 1 basis functions of degree k that are (possibly) non-zero
over the interval [ti , ti+1 [.
Nj,k , (t) = 0 if t
/ [tj , tj+k +1 [
are the only candidate B-spline basis functions to be non-zero over [ti , ti+1 [.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 154
Properties of B-Spline Basis Functions
Lemma 111
All B-spline basis functions of degree k are piecewise polynomials of degree k .
1
N1,2
t0 t1 t2 t3 t4 t5
Lemma 112
All B-spline basis functions of degree k are k r times continuously differentiable
at a knot of multiplicity r , and k 1 times continuously differentiable everywhere
else. The first derivative of Ni,k is given as follows:
0 k k
Ni,k (t) = Ni,k 1 (t) Ni+1,k 1 (t)
ti+k ti ti+k +1 ti+1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 155
Properties of B-Spline Basis Functions
Lemma 113
For a uniform knot vector all B-spline basis functions of the same degree are
shifted copies of each other: For all (permissible) i Z and k N0 we have
Ni,k , (t) = N0,k , (t i c), where c := t1 t0 .
X1
mk
Ni,k , (t) = 1 for all t [tk , tmk [.
i=0
Corollary 115
Let = (t0 , t1 , t2 , . . . , tn+k +1 ) be a finite knot vector, for some k N0 with k n.
Then,
n
X
Ni,k , (t) = 1 for all t [tk , tn+1 [.
i=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 156
Properties of B-Spline Basis Functions
Proof of Lemma 114 (Partition of Unity) : We do a proof by induction on k .
I.B.: By definition, this claim is correct for k = 0.
I.H.: Suppose that it is true forP degree k 1, for some arbitrary but fixed k N such
that k < m2 . I.e., suppose that mk i=0 Ni,k 1, (t) = 1 for all t [tk 1 , tmk +1 [.
I.S.: Recall that (by Lem. 106)
N0,k 1, (t) = 0 for t
/ [t0 , tk [ and Nmk ,k 1, (t) = 0 for t
/ [tmk , tm [.
Let t [tk , tmk [ be arbitrary but fixed. Applying the recursion yields
X1
mk X1 t ti
mk
ti+k +1 t
Ni,k , (t) = Ni,k 1, (t) + Ni+1,k 1, (t)
ti+k ti ti+k +1 ti+1
i=0 i=0
X1
mk
t ti X2 ti+k +1 t
mk
= Ni,k 1, (t) + Ni+1,k 1, (t)
ti+k ti ti+k +1 ti+1
i=1 i=0
X1
mk
t ti X1
mk
ti+k t
= Ni,k 1, (t) + Ni,k 1, (t)
ti+k ti ti+k ti
i=1 i=1
X1
mk mk
X t[tk 1 ,tmk +1 [
= Ni,k 1, (t) = Ni,k 1, (t) = 1.
i=1 i=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 157
B-Spline Curves
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 159
Clamped and Unclamped B-Spline Curves
I Recall that the Partition of Unity (Cor. 115) holds for all t [tk , tn+1 [.
I Typically, for a clamped knot vector,
Lemma 118
Let P be a B-spline curve of degree k defined by n + 1 control points with position
vectors p0 , p1 , . . . , pn , over the clamped knot vector := (t0 , t1 , . . . , tn+k +1 ), for
n N and k N0 with k n. Then P starts in p0 and ends in pn .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 160
Clamped and Unclamped B-Spline Curves
0 0 2 4 6 8 8
I Control points: { 0
, 2
, 3
, 0
, 3
, 2
, 0
}.
1 1 3 2 1 3 7 4 9
uniform unclamped cubic B-spline: = (0, , , , , , , , , , 1)
10 5 10 5 2 5 10 5 10
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 161
Proof of Lemma 118
We prove P(tk ) = p0 . Recall that N0,k (t) is non-zero only for t [t0 , tk +1 [.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 162
Proof of Lemma 118
Applying the standard recursion for the B-spline basis functions at parameter tk ,
tk ti ti+k +1 tk
Ni,k (tk ) = Ni,k 1 (tk ) + Ni+1,k 1 (tk ),
ti+k ti ti+k +1 ti+1
for i = 0 (and subsequently for i = j and k j for j {1, . . . , k 1}) yields
tk t0 tk +1 tk
N0,k (tk ) = N0,k 1 (tk ) + N1,k 1 (tk )
tk t0 tk +1 t1
tk +1 tk
= N1,k 1 (tk ) = N1,k 1 (tk )
tk +1 tk
tk t1 tk +1 tk
= N1,k 2 (tk ) + N2,k 2 (tk )
tk t1 tk +1 t2
= N2,k 2 (tk ) = = Nk ,0 (tk )
= 1.
Hence, due to the Partition of Unity (Cor. 115), Ni,k (tk ) = 0 for i > 0 and we get
n
X
Ni,k (tk )pi = N0,k (tk )p0 = p0 .
i=0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 163
Generation of Knot Vector
I Suppose that a B-spline curve over [0, 1] has n + 1 control points {p0 , p1 , . . . , pn }
and degree k .
I We need m + 1 knots, where m = n + k + 1.
I If the B-spline curve is clamped then we get
t0 = t1 = . . . = tk = 0
j
tk +j = for j = 1, 2, . . . , n k
nk +1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 164
Generation of Knot Vector
I Suppose that n = 6, i.e., that we have seven control points p0 , . . . , p6 and want to
construct a clamped cubic B-spline curve. (Hence, k = 3.)
I We have in total m + 1 = n + k + 2 = 6 + 3 + 2 = 11 knots and get
1 2 3
:= (0, 0, 0, 0, , , , 1, 1, 1, 1)
| {z } 4 4 4 | {z }
k +1=4 k +1=4
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 165
Properties of B-Spline Curves
Lemma 119
The lower the degree of a B-spline curve, the closer it follows its control polygon.
Sketch of Proof : The lower the degree, the fewer control points contribute to P(t).
For k = 1 it is simply the convex combination of pairs of control points.
I Clamped
n uniform B-spline of degree 10 for a control polygon with 14 vertices:
1 1 3
5 6 5 3 3 11 8 8 10 4 1o
1
, 3 , 5 , 5 , 4 , 2 , 2 , 1 , 1 , 3 , 5 , 6 , 7 , 5
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 166
Properties of B-Spline Curves
Lemma 120 (Variation diminishing property )
If a straight line intersects the control polygon of a B-spline curve m times then it
intersects the actual B-spline curve at most m times.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 167
Properties of B-Spline Curves
Lemma 122
Let P be a clamped B-spline curve of degree k over [0, 1] defined by k + 1 control
points with position vectors p0 , p1 , . . . , pk and the knot vector := (t0 , t1 , . . . , t2k +1 ),
for k N0 . Then P is a Bzier curve of degree k .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 168
Derivatives of B-Spline Curves
Lemma 123
Let P be a B-spline curve of degree k defined by n + 1 control points with position
vectors p0 , p1 , . . . , pn , and the knot vector := (t0 , t1 , . . . , tn+k +1 ), for n N and
k N0 with k n. Then
n1
X
P 0 (t) = Ni+1,k 1 (t)qi for t [tk , tn+1 [,
i=0
where
k
qi := (pi+1 pi ) for i {0, 1, . . . , n 1}
ti+k +1 ti+1
and the knot vector remains unchanged.
Sketch of Proof : This is a consequence of Lem. 112 and some (lengthy) analysis.
I Since the first derivative of a B-spline curve is another B-spline curve, one can
apply this technique recursively to compute higher-order derivatives.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 169
Derivatives of B-Spline Curves
Lemma 124
Let P be a B-spline curve of degree k defined by n + 1 control points with position
vectors p0 , p1 , . . . , pn and the clamped knot vector := (t0 , t1 , . . . , tn+k +1 ), for n N
and k N0 with k n. Then, for the new knot vector 0 := (t1 , t2 , . . . , tn+k 1 , tn+k ),
n1
X
P 0 (t) = Ni,k 1, 0 (t)qi for t [tk , tn+1 [,
i=0
where
k
qi := (pi+1 pi ) for i {0, 1, . . . , n 1}.
ti+k +1 ti+1
Sketch of Proof : One can show that Ni+1,k 1, (t) is equal to Ni,k 1, 0 (t) for all
t [tk , tn+1 [.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 170
Derivatives of B-Spline Curves
Corollary 125
A clamped B-spline curve is tangent to the first leg and the last leg of its control
polygon.
Sketch of Proof : Recall that, by Lem. 124, the first derivative of a clamped B-spline
curve P of degree k is a clamped B-spline curve of degree k 1 over essentially the
same knot vector but with new control points of the form
k
qi := (pi+1 pi ) for i {0, 1, . . . , n 1}.
ti+k +1 ti+1
Hence, by arguments similar to those used in the proof of Lem. 118, one can show
that P 0 (tk ) starts in q0 and, thus, the tangent of P in the start point P(tk ) is parallel to
p1 p0 .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 171
Strong Convex Hull Property
Proof : Lemma 109 tells us that Nik ,k , Nik +1,k , . . . , Ni1,k , Ni,k are the only B-spline
basis functions that can be non-zero over [ti , ti+1 [, for k i n, while all other basis
functions are zero (Lem. 107). Together with Cor. 115 we get
n
X i
X
1= Nj,k (t) = Nj,k (t) for all t [ti , ti+1 [.
j=0 j=ik
Hence,
n
X i
X
P(t) = Nj,k (t)pj = Nj,k (t)pj for all t [ti , ti+1 [
j=0 j=ik
p2
p1
p3
p6
p0 p4
p5
Second knot span of a cubic B-spline contained in CH({p1 , p2 , p3 , p4 }).
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 173
Local Control and Modification
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 174
Local Control and Modification
I Clamped uniform B-spline of degree three with knot vector
:= (0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 11, 11)
for a control
n polygon with 14 vertices:
1 1
3 5 6 5 3 3 11 8 8 10 4 o
1
1
, 3 , 5 , 5 , 4 , 2 , 2 , 1 , 1 , 3 , 5 , 6 , 7 , 5
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 175
Local Control and Modification
I Clamped uniform B-spline of degree three with knot vector
:= (0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 11, 11)
for a control
n polygon with 14 vertices:
1 1
3 5 6 5 3 1 11 8 8 10 4 o
1
1
, 3 , 5 , 5 , 4 , 2 , 2 , 4 , 1 , 3 , 5 , 6 , 7 , 5
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 175
Multiple Control Points
Sketch of Proof : This is a consequence of Lemma 109 and of the strong convex hull
property (Lem. 126).
I Note that this implies that a degree-k B-spline P starts at p0 if
p0 = p1 = . . . = pk 1 .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 176
Multiple Control Points
Clamped cubic B-spline with control points
! ! ! ! ! !
2 0 4 8 8 6
, , , , ,
0 4 5 4 2 0
and uniform knot vector (0, 0, 0, 0, 1, 2, 3, 3, 3, 3):
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 177
Multiple Control Points
Clamped cubic B-spline with control points
! ! ! ! ! ! ! !
2 0 4 4 4 8 8 6
, , , , , , ,
0 4 5 5 5 4 2 0
and uniform knot vector (0, 0, 0, 0, 1, 2, 3, 4, 5, 5, 5, 5):
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 177
Multiple Control Points
Clamped cubic B-spline with control points
! ! ! ! ! ! !
2 0 4 6 8 8 6
, , , 9 , , ,
0 4 5 2
4 2 0
and uniform knot vector (0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 4):
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 177
Multiple Control Points
Clamped cubic B-spline with control points
! ! ! ! ! ! ! !
2 0 4 5 7 8 8 6
, , , 19 , 17 , , ,
0 4 5 4 4
4 2 0
and uniform knot vector (0, 0, 0, 0, 1, 2, 3, 4, 5, 5, 5, 5):
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 177
Multiple Knots
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 178
Multiple Knots
I Clamped uniform B-spline of degree three for a control polygon with nine vertices:
( ! ! ! ! ! ! ! ! !)
1 0 0 2 4 6 8 8 9
, , , , , , , ,
0 0 2 3 0 3 2 0 0
Knot vector:
:= (0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6, 6, 6)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 179
Multiple Knots
I Clamped uniform B-spline of degree three for a control polygon with nine vertices:
( ! ! ! ! ! ! ! ! !)
1 0 0 2 4 6 8 8 9
, , , , , , , ,
0 0 2 3 0 3 2 0 0
Knot vector:
:= (0, 0, 0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 4)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 179
Motivation for de Boors Algorithm
I Can we express P(t) in terms of Ni,0 (t)?
I We exploit the recursive definition of Ni,k in order to determine P(t) in terms of
Ni,k 1 (t), recalling that t [tk , tn+1 [.
n n
X X t ti ti+k +1 t
P(t) = Ni,k (t)pi = Ni,k 1 (t) + Ni+1,k 1 (t) pi
ti+k ti ti+k +1 ti+1
i=0 i=0
n n
X t ti X ti+k +1 t
= Ni,k 1 (t)pi + Ni+1,k 1 (t)pi
ti+k ti ti+k +1 ti+1
i=0 i=0
n
t t0 X t ti
= N0,k 1 (t)p0 + Ni,k 1 (t)pi +
tk t0 ti+k ti
i=1
n1
tn+k +1 t X ti+k +1 t
Nn+1,k 1 (t)pn + Ni+1,k 1 (t)pi
tn+k +1 tn+1 ti+k +1 ti+1
i=0
n n
?
X t ti X ti+k t
= Ni,k 1 (t)pi + Ni,k 1 (t)pi1
ti+k ti ti+k ti
i=1 i=1
n n
X ti+k t t ti X
= Ni,k 1 (t) pi1 + pi =: Ni,k 1 (t)pi,1 (t)
ti+k ti ti+k ti
i=1 i=1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 180
Motivation for de Boors Algorithm
I Equality at ? holds since each basis function Ni,k is non-zero only over [ti , ti+k +1 [
(Local Support Lem. 106):
where
ti+k 1 t t ti
pi,2 (t) := pi1,1 (t) + pi,1 (t) for 2 i n.
ti+k 1 ti ti+k 1 ti
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 181
De Boors Algorithm
where
t ti
i,j := ,
ti+k +1j ti
then
n
X
P(t) = Ni,0 (t)pi,k (t) for t [tk , tn+1 [.
i=k
Corollary 132
Let P be a B-spline curve of degree k with control points p0 , p1 , . . . , pn and knot
vector := (t0 , t1 , . . . , tn+k +1 ). If t [ti , ti+1 [, for i {k , k + 1, . . . , n}, then
P(t) = pi,k (t).
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 182
Sample Run of de Boors Algorithm
I Clamped uniform B-spline of degree three for seven control points:
( ! ! ! ! ! ! !)
0 0 2 4 6 8 8
, , , , , ,
0 2 3 0 3 2 0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 183
Sample Run of de Boors Algorithm
I Clamped uniform B-spline of degree three for seven control points:
( ! ! ! ! ! ! !)
0 0 2 4 6 8 8
, , , , , ,
0 2 3 0 3 2 0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 183
Sample Run of de Boors Algorithm
I Clamped uniform B-spline of degree three for seven control points:
( ! ! ! ! ! ! !)
0 0 2 4 6 8 8
, , , , , ,
0 2 3 0 3 2 0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 183
Sample Run of de Boors Algorithm
I Clamped uniform B-spline of degree three for seven control points:
( ! ! ! ! ! ! !)
0 0 2 4 6 8 8
, , , , , ,
0 2 3 0 3 2 0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 183
De Boors Algorithm for Subdividing a B-Spline Curve
I Clamped uniform B-spline of degree three for seven control points:
( ! ! ! ! ! ! !)
0 0 2 4 6 8 8
, , , , , ,
0 2 3 0 3 2 0
(p0,0 , p1,1 , p2,2 , p3,3 ) and (p3,3 , p3,2 , p3,1 , p3,0 , p4,0 , p5,0 , p6,0 )
I New knot vectors for t ? := 0.7:
(0, 0, 0, 0, 0.7, 0.7, 0.7, 0.7) and (0.7, 0.7, 0.7, 0.7, 1, 2, 3, 4, 4, 4, 4)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 184
De Boors Algorithm for Subdividing a B-Spline Curve
Definition 133
Let P be a clamped B-spline curve of degree k defined by n + 1 control points with
position vectors p0 , p1 , . . . , pn and the clamped knot vector := (t0 , t1 , . . . , tn+k +1 ),
for n N and k N0 with k n. For some t ? [ti , ti+1 [, with i {k , . . . , n}, we
define two new knot vectors ? , ?? and two new control polygons P ? , P ?? as
follows:
If t ? 6= ti then m := i else m := i 1.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 185
De Boors Algorithm for Subdividing a B-Spline Curve
Lemma 134
Let P be a clamped B-spline curve of degree k defined by n + 1 control points with
position vectors p0 , p1 , . . . , pn and the clamped knot vector := (t0 , t1 , . . . , tn+k +1 ),
for n N and k N0 with k n. (Hence, t0 = t1 = . . . = tk < tk +1 and
tn < tn+1 = . . . = tn+k +1 .) For some t ? [ti , ti+1 [, with i {k , . . . , n}, we define two
new knot vectors ? , ?? and two new control polygons P ? , P ?? as in Def. 133.
Then we get two new B-spline curves P ? and P ?? of degree k with control polygon
P ? (P ?? , resp.) and knot vector ? ( ?? , resp.) that join in a tangent-continuous way
at point pkk (t ? ) = P(t ? ), such that
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 186
De Boors Algorithm for Splitting a B-Spline Curve into Bzier Segments
Corollary 135
Let P be a clamped B-spline curve of degree k defined by n + 1 control points with
position vectors p0 , p1 , . . . , pn and the clamped knot vector := (t0 , t1 , . . . , tn+k +1 ),
for n N and k N0 with k n. (Hence, t0 = t1 = . . . = tk < tk +1 and
tn < tn+1 = . . . = tn+k +1 .) Subdividing P at the knot values {tk +1 , tk +2 , . . . , tn1 , tn },
as outlined in Def. 133, splits P into n k + 1 Bzier curves of degree k .
Proof : Lemma 134 ensures that each of the resulting curves is a B-spline curve of
degree k , where the m-th curve is defined over [tk +m , tk +m+1 [, for
m {0, 1, . . . , n k }. Each curve has knot vectors of length 2k + 2, with start and
end knots of multiplicity k + 1 but no interior knots. By Lem. 122, each resulting
B-spline curve is a Bzier curve of degree k .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 187
De Boors Algorithm for Splitting a B-Spline Curve into Bzier Segments
I Clamped uniform B-spline of degree three for seven control points:
( ! ! ! ! ! ! !)
0 0 2 4 6 8 8
, , , , , ,
0 2 3 0 3 2 0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 188
Knot Insertion
I Suppose that we would like to insert a new knot t ? [tj , tj+1 [, for some
j {k , k + 1, . . . , n}, into the knot vector
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 189
Knot Insertion
if, for 0 i n + 1,
pi if i j k
pi? := (1 i )pi1 + i pi if j k + 1 i j
pi1 if i j + 1
and
t ? ti
i := for i {j k + 1, . . . , j}.
ti+k ti
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 190
Knot Insertion
I Clamped
n uniform B-spline of degree three for thirteen control points:
o
1
1 3
5
6 5
3
3
11
8
8 10
4
1
1 , 3 , 5 , 5 , 4 , 2 , 2 , 1 , 1 , 3 , 5 , 6 , 7 , 5
Knot vector with 17 knots: := (0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 11, 11).
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 191
Knot Insertion and Deletion
I The so-called Oslo algorithm, developed by Cohen et al. [1980], is more general
than Boehms algorithm: It allows the insertion of several (possibly multiple) knots
into a knot vector. (It is also substantially more complex, though.)
I An algorithm for the removal of a knot is due to Tiller [1992]. However, as pointed
out by Tiller, knot removal and degree reduction result in an overspecified
problem which, in general, can only be solved within some tolerance.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 192
Closed B-Spline Curves
Lemma 137
Let P be a B-spline curve of degree k defined by n + 1 control points with position
vectors p0 , p1 , . . . , pn and the uniform knot vector := (t0 , t1 , . . . , tn+k +1 ), for n N
and k N0 with k n. If
Lemma 138
Let P be a B-spline curve of degree k defined by n + 2 control points with position
vectors p0 , p1 , . . . , pn , pn+1 and the (possibly non-uniform and periodic) knot vector
:= (t0 , t1 , . . . , tn+k +1 , tn+k +2 ), for n N and k N0 with k n. If
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 193
Closed B-Spline Curves via Wrapping of Control Points
I Uniform
n B-spline of degree three for nine control
o points:
4
4
0 0
12
12
4
4
0
3 , 0 , 0 , 7 , 7 , 2 , 3 , 0 , 0
1
Knot vector with 13 knots: := (0, , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 1).
12 12 12 12 12 12 12 12 12 12 12
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 194
B-Spline Surfaces
where Ni,k 0 , is the i-th B-spline basis function of degree k 0 relative to , and Nj,k 00 ,
is the j-th B-spline basis function of degree k 00 relative to .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 196
Sample B-Spline Surfaces
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 197
Properties of B-Spline Surfaces
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 198
Properties of B-Spline Surfaces
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 199
Evaluation of a B-Spline Surface
I Five easy steps to calculate a point on a B-spline patch for (s, t)
1. Find the knot span in which s lies, i.e., find i such that s [si , si+1 [.
2. Evaluate the non-zero basis functions Nik 0 ,k 0 (s), . . . , Ni,k 0 (s).
3. Find the knot span in which t lies, i.e., find j such that t [tj , tj+1 [.
4. Evaluate the non-zero basis functions Njk 00 ,k 00 (t), . . . , Nj,k 00 (t).
5. Multiply Ni 0 ,k 0 (s) with Nj 0 ,k 00 (t) and with the control point pi 0 ,j 0 , for
i 0 {i k 0 , . . . , i} and j 0 {j k 00 , . . . , j}.
I Alternatively, one can apply an appropriate generalization of de Boors algorithm.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 200
Motivation
I Can we use a B-spline curve to represent a circular arc?
( ! ! ! ! ! ! ! ! !)
1 1 0 1 1 1 0 1 1
, , , , , , , ,
0 1 1 1 0 1 1 1 0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 202
Non-Uniform Rational B-Splines
where Ni,k is the i-th B-spline basis function of degree k relative to , with the
weights wi > 0 for all i {0, 1, . . . , n}.
I If all wi := 1 then we obtain the standard B-spline curve. (Recall the Partition of
Unity, Cor. 115.)
I Both the numerator and the denominator are (piecewise) polynomials of degree
k . Hence, N is a piecewise rational curve of degree k .
I In general, the weights wi are required to be positive; a zero weight effectively
turns off a control point, and can be used for so-called infinite control points
[Piegl 1987].
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 203
Geometric Interpretation of NURBS
u
I We resort to homogeneous coordinates: For w 6= 0, v are the
w
homogeneous coordinates of yx , and yx are the inhomogeneous coordinates of
u
v x = u and y = v .
w w
w
wi xi
For pi := xyi R2 , let piw := wi yi R3 , for all i {0, 1, . . . , n}.
I
i
wi
I Now consider
Pn
n
X i=0 Ni,k (t)(wi xi )
n
N w (t) := Ni,k (t) piw = P
P
i=0 Ni,k (t)(wi yi )
.
n
i=0 i=0 Ni,k (t)wi
I Dividing the first two components of N w by its third component equals the
projection of N w to the plane w = 1.
I Hence, a NURBS curve in Rd is the projection of a B-spline curve in Rd+1 and,
thus, it inherits properties of B-spline curves.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 204
Geometric Interpretation of NURBS
Projection onto z = 1
A NURBS curve in Rd is the projection of a B-spline curve in Rd+1
(w0 x0 , w0 y0 , w0 )
z
(w3 x3 , w3 y3 , w3 )
z=1
(x3 , y3 , 1)
(w1 x1 , w1 y1 , w1 )
(x0 , y0 , 1) (w2 x2 , w2 y2 , w2 )
y
(x1 , y1 , 1) (x2 , y2 , 1)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 205
Geometric Interpretation of NURBS
I Rational (inhomogeneous) parameterization of the unit circle in the plane:
1 t2
x(t) :=
1 + t2
2t
y (t) :=
1 + t2
I Parameterization of the unit circle in the plane in homogeneous coordinates:
u(t) := 1 t 2
v (t) := 2t
w(t) := 1 + t 2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 206
NURBS Basis Functions
I Since NURBS basis functions in Rd are given by the projection of B-spline basis
functions in Rd+1 , we may expect that the properties of B-spline basis functions
carry over to NURBS basis functions.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 207
Properties of NURBS Basis Functions
Lemma 148
For n N and k N0 with k n, let := (t0 , t1 , t2 , . . . , tn+k +1 ) be a knot vector.
Then the following properties hold for all (permissible) values of i N0 :
Non-negativity:
Ri,k (t) 0 for all real t.
Local support:
Ri,k (t) = 0 if t
/ [ti , ti+k +1 [.
Local influence:
Rj,k non-zero over [ti , ti+1 [ j {i k , i k + 1, . . . , i}.
Partition of unity: n
X
Rj,k (t) = 1 for all t [tk , tn+1 [.
j=0
Continuity:
All NURBS basis functions of degree k are k r times continuously
differentiable at a knot of multiplicity r , and k 1 times continuously
differentiable everywhere else.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 208
Properties of NURBS Curves
Lemma 149
For n N and k N0 with k n, consider a set of n + 1 control points with position
vectors p0 , p1 , . . . , pn in the plane, and let := (t0 , t1 , . . . , tn+k +1 ) be a knot vector.
Then the following properties hold:
Clamped interpolation: If is clamped then the NURBS curve N starts in p0 and
ends in pn .
Variation diminishing property: If a straight line intersects the control polygon of
N m times then it intersects N at most m times.
Strong convex hull property: For i N with k i n, we have
Local control: The NURBS curve N restricted to [ti , ti+1 [ depends only on the
positions of pik , pik +1 , . . . , pi1 , pi .
Local modification scheme: A modification of the position of pi changes N only
in the parameter interval [ti , ti+k +1 [, for i {0, 1, . . . , n}.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 209
Properties of NURBS Curves
Lemma 151
For n N and k N0 with k n, consider a set of n + 1 control points with position
vectors p0 , p1 , . . . , pn in the plane, and let := (t0 , t1 , . . . , tn+k +1 ) be a knot vector
and w0 , w1 , . . . , wn be weights. Then the following properties hold for all
i {0, 1, . . . , n}:
1. The weight wi effects only the knot span [ti , ti+k +1 [.
2. If wi decreases (relative to the other weights) then the NURBS curve is pushed
away from pi .
3. If wi = 0 then pi does not contribute to the NURBS curve.
4. If wi increases (relative to the other weights) then the NURBS curve is pulled
towards pi .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 210
Sample NURBS Curve
I Clamped uniform rational B-spline of degree three for a control polygon with nine
vertices:
( ! ! ! ! ! ! ! ! !)
1 0 0 2 4 6 8 8 9
, , , , , , , ,
0 0 2 3 0 3 2 0 0
Knot vector:
:= (0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6, 6, 6)
Weights:
(1, 1, 1, 1, 1, 1, 1)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 211
Sample NURBS Curve
I Clamped uniform rational B-spline of degree three for a control polygon with nine
vertices:
( ! ! ! ! ! ! ! ! !)
1 0 0 2 4 6 8 8 9
, , , , , , , ,
0 0 2 3 0 3 2 0 0
Knot vector:
:= (0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6, 6, 6)
Weights:
(1, 1, 1, 10, 1, 1, 1)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 211
Sample NURBS Curve
I Clamped uniform rational B-spline of degree three for a control polygon with nine
vertices:
( ! ! ! ! ! ! ! ! !)
1 0 0 2 4 6 8 8 9
, , , , , , , ,
0 0 2 3 0 3 2 0 0
Knot vector:
:= (0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6, 6, 6)
Weights:
(1, 1, 1, 0.1, 1, 1, 1)
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 211
Conics Modeled by NURBS
I NURBS can represent all conic curves (circle, ellipse, parabola, hyperbola)
exactly.
I Conics are quadratic curves.
I Hence, consider three control points p0 , p1 , p2 and the following quadratic
NURBS curve
P2
i=0 Ni,2 (t) wi pi
N2 (t) := P 2
with := (0, 0, 0, 1, 1, 1),
i=0 Ni,2 (t) wi
I Can we come up with conditions for w0 , w1 , w2 that allow to characterize the type
of curve represented by N2 ?
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 212
Conics Modeled by NURBS
Lemma 152
The conic shape factor, , determines the type of conic represented by N2 :
<1 . . . N2 is an elliptic curve,
w12
:= =1 . . . N2 is a parabolic curve,
w0 w2
>1 . . . N2 is a hyperbolic curve.
:= (0, 0, 0, 1, 1, 1)
and weights:
(1, 1/10, 1), hence < 1.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 213
Conics Modeled by NURBS
Lemma 153
The conic shape factor, , determines the type of conic represented by N2 :
<1 . . . N2 is an elliptic curve,
w12
:= =1 . . . N2 is a parabolic curve,
w0 w2
>1 . . . N2 is a hyperbolic curve.
:= (0, 0, 0, 1, 1, 1)
and weights:
(1, 1, 1), hence = 1.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 213
Conics Modeled by NURBS
Lemma 154
The conic shape factor, , determines the type of conic represented by N2 :
<1 . . . N2 is an elliptic curve,
w12
:= =1 . . . N2 is a parabolic curve,
w0 w2
>1 . . . N2 is a hyperbolic curve.
:= (0, 0, 0, 1, 1, 1)
and weights:
(1, 5, 1), hence > 1.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 213
Conics Modeled by NURBS
Lemma 155
The quadratic NURBS curve N2 represents a circular arc
I if the control points p0 , p1 , p2 form an isosceles triangle, and
I if the weights are set as follows:
kp0 p2 k
w0 := 1 w1 := w2 := 1
2 kp0 p1 k
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 214
Conics Modeled by NURBS
I It is also possible to construct a circle by a single NURBS curve.
( ! ! ! ! ! ! ! ! !)
1 1 0 1 1 1 0 1 1
, , , , , , , ,
0 1 1 1 0 1 1 1 0
Knots:
3 3
(0, 0, 0, , , , , , , 2, 2, 2)
2 2 2 2
Weights:
1 1 1 1
(1, , 1, , 1, , 1, , 1)
2 2 2 2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 215
Conics Modeled by NURBS
I Applying an affine transformation to the control points yields an ellipse.
( ! ! ! ! ! ! ! ! !)
2 2 0 2 2 2 0 2 2
, , , , , , , ,
0 1 1 1 0 1 1 1 0
1 1 1 1
Knots: (0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4) Weights: (1, , 1, , 1, , 1, , 1)
2 2 2 2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 216
Sample NURBS Surface
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 217
Approximation and Interpolation
Distance Measures
Interpolation of Point Data
Bernstein Approximation of Functions
Approximation of Polygonal Profiles
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 218
Hausdorff Distance
I Let A, B be two subsets of a metric space X and let d(p, q) denote the distance
between two elements p, q X . E.g., take Rn and the (standard) Euclidean
distance.
I How can we measure how similar A and B are?
I This is a frequently asked question in image processing, solid modeling,
computer graphics and computational geometry.
I Note that the classical minimin function
D(A, B) := inf inf d(a, b)
aA bB
is a very poor measure of similarity between A and B: One can easily get
D(A, B) = 0 although A and B need not be similar at all, according to any natural
human interpretation of similarity.
I So, can we do any better?
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 220
Hausdorff Distance
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 222
Frchet Distance
I Note that we do not demand strict monotonicity for either or .
I While efficient algorithms are known for computing the Frchet distance of
polygonal curves, the same problem for triangulated surfaces is N P-hard.
I However, a variant, the so-called weak Frchet distance, can be computed in
polynomial time [Alt&Buchin 2010].
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 223
Interpolation Versus Approximation
I For m N0 , we are given m + 1 points q0 , q1 , . . . , qm Rn , possibly with
matching parameter values u0 < u1 < . . . < um .
C C
u u
I Similarly for approximation/interpolation by a surface rather than curve.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 225
Lagrange Interpolation
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 226
Lagrange Interpolation
Lemma 160
For m N, let L be defined for m + 1 parameter values u0 < u1 < . . . < um and
m + 1 data points q0 , q1 , . . . , qm , as given in Def. 159. Then L(uj ) = qj for all
j {0, 1, . . . , m}.
Corollary 161
For m N, the Lagrange polynomials L0,m , L1,m , . . . , Lm,m form a basis of the vector
space of all polynomials of degree at most m.
1.0
0.5
-4 -2 2 4
-0.5
-1.0
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 228
B-Spline Interpolation
I Let k N0 and suppose that we are looking for n + 1 control points p0 , p1 , . . . , pn
and a knot vector := (t0 , t1 , . . . , tn+k +1 ) such that the B-spline curve B of degree
k defined by p0 , p1 , . . . , pn and interpolates q0 , q1 , . . . , qm , with B(ui ) = qi for all
i {0, 1, . . . , m} and some given u0 < u1 < . . . < um .
I If n = m, then we get the following system of equations:
N0,k (u0 ) Nn,k (u0 )
p0 q0
.. .. . .
.. = ..
. .
N0,k (un ) Nn,k (un ) pn qn
| {z } | {z } | {z }
=:N =:p =:q
I The matrix N is a sparse band matrix without negative elements. (Recall the
Local Support Lem. 106.)
I Fast and numerically reliable algorithms exist for computing the inverse of N.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 229
B-Spline Interpolation
I Most applications do not require specific parameter values ui .
I In such a case, one can fix the knots ti , and choose ui as follows
(Greville-abscissae):
k
1X
ui := ti+j for all i {0, 1, . . . , n}.
k
j=1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 230
Effects of Parameters and Knots
I Since a B-spline has continuous speed and acceleration (for k 3), it is obvious
that the parameter values ui should bear a meaningful relation to the distances
between the data points. Otherwise, overshooting is bound to occur!
I Consider
with
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 231
B-Spline Approximation
I If m > n, i.e., if there are more data points than control points, then the linear
system Np = q is over-determined and a solution need not exist.
I One popular option is a least-squares fit, which is achieved if
NT Np = NT q.
I Hence, if NT N is invertible then we get
p = (NT N)1 NT q.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 232
Natural-Neighbor Interpolation
I Problem studied:
I Given: A set S of m + 1 sites p , p , . . . , pm R2 with associated (scalar or
0 1
vector-valued) data q0 , q1 , . . . , qm , and q CH(S).
I Sought: An estimate f (q) of the data at q, obtained by interpolation of
q0 , . . . , qm .
Natural-neighbor extrapolation
[Bobach et al. 2009]: NNI outside of convex
hull.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 233
Natural-Neighbor Interpolation: Voronoi Diagram
I Consider a set S of m + 1 sites p0 , p1 , . . . , pm R2 .
I The Voronoi region VR(pi , S) of pi S relative to S is the set of all points of R
which are closer to pi than to any other point of S \ {pi }.
I Similarly for some other pj S.
I The Voronoi diagram VD(S) is given by the union of all boundaries of all Voronoi
regions of points of S.
Incremental Construction
The Voronoi diagram VD(S {q}) can be
obtained incrementally from VD(S).
I Hence, every polynomial (in power basis) can be seen as a Bernstein polynomial,
albeit with unknown scalars for the linear combination.
I Can we select i such that a decent approximation of a user-specified function is
achieved?
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 237
Bernstein Approximation
ta
I Since x := ba maps t [a, b] to x [0, 1], this approximation theorem extends
to continuous functions f : [a, b] R.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 238
Sample Bernstein Approximation
I Sample Bernstein approximation of a continuous function:
1
f : [0, 1] R f (x) :=
1 + (10x 5)2
1.0
0.8
0.6
0.4
0.2
Degree 2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 239
Sample Bernstein Approximation
I Sample Bernstein approximation of a continuous function:
1
f : [0, 1] R f (x) :=
1 + (10x 5)2
1.0
0.8
0.6
0.4
0.2
Degree 128
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 239
Sample Bernstein Approximation
I Sample Bernstein approximation of a continuous function:
1
f : [0, 1] R f (x) := sin (x) + sin 6x + x 2
5
1.0
0.8
0.6
0.4
0.2
Degree 2
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 240
Sample Bernstein Approximation
I Sample Bernstein approximation of a continuous function:
1
f : [0, 1] R f (x) := sin (x) + sin 6x + x 2
5
1.0
0.8
0.6
0.4
0.2
Degree 256
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 240
Approximation of Polygonal Profiles
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 242
Sample Real-World Application: Tool-Path Generation
I Approximation of tool paths: Asymmetric tolerances may be required!
I In the example: 6 648 input line segments versus 252 circular arcs.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 243
Sample Real-World Application: Conversion of Scanned Data
I Scanned data tends to be noisy.
I In the example: 526 489 segments
(within 1 827 input polygons) versus
42 222 circular arcs or
14 462 cubic B-splines.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 244
Sample Real-World Application: Recovering PCB Data
I Huge(!) data sets; maintaining the input topology is imperative.
I In the (toy) example: 81 984 input line segments versus 1 000 output line
segments and 9 791 circular arcs.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 245
Specifying a Tolerance
I Intuitively, for an input profile P we
seek a tolerance zone, T Z(P, dl , dr ),
of P with left tolerance dl and right
tolerance dr .
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 246
Specifying a Tolerance
I It seems natural to pre-compute T Z(P, dl , dr ) prior to approximation.
I But: Individual tolerance zones of the input profiles may intersect arbitrarily!
dr
dl
dl
dr
I Hence, we need to compute the tolerance zones for all profiles P of the input P
at once!
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 247
Cone of Influence
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 248
Signed Distance
p s s p
s
| {z } p | {z }
s2 ds (s, p) > 0
ds (s, p) < 0 | {z }
ds (s, p) > 0 s1
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 249
Tolerance Zone
The tolerance zone of P is defined as the union of all tolerance zones of all sites:
[
T Z(P, dl , dr ) := T Z site (s, P, dl , dr ) .
sP
dr
dl dr
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 250
Problem Statement
Given: Input
I Set P of (open or closed)
I A consists of Gk curves,
for some k N,
I A T Z(P, dl , dr ),
I P T Z(A, dr , dl ) if
requested by user,
I all curves of A are simple
and pairwise disjoint,
I topology of A matches
topology of P.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 251
Tolerance Zone and Distance Measures
I Assume dl = dr > 0. We have
where Fr(A, P) denotes the Frchet distance between A and P, for each A A
and corresponding P P.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 252
Tolerance Zone and Distance Measures
I Omitting the second condition P T Z(A, dr , dl ) makes a difference!
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 253
VD-Based Computation of the Tolerance Zone
I [Held&Heimlich 2008; Held&Kaaser 2014] use the Voronoi diagram of the input
to compute the boundary of the tolerance zone.
dl
dr
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 254
Offset Spikes
I Offset spikes ensure that the directed Hausdorff distance from the input to the
approximation curve does not exceed the user-specified maximum tolerance.
I Spikes are formed by portions of the Voronoi diagram; they can be computed in
linear time.
dl dl
d d > |dl |
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 255
Circular Biarcs
ts c2
a1
pj
ps a2
c1 te
pe
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 256
Circular Biarcs
I The joint pj is not uniquely determined.
Lemma 173
Consider two points ps and pe together with two tangents ts and te . Then all
possible joints for the biarcs defined by ps , pe , ts , te lie on a circle.
ts c2
a1
pj
ps a2
c1 te
pe
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 257
Approximation Nodes
I Which points and tangents shall be used for the approximation?
I Note: Input vertices
I do not lie in the tolerance zone for one-sided tolerances, and
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 258
Approximation Nodes
1. [Held&Heimlich 2008] compute Voronoi diagram inside of the tolerance zone.
2. Place approximation nodes (a-nodes) on medial axis of the boundaries of the
components of the tolerance zone; tangents according to [Meek&Walton 1992]:
(ai ai1 )/||ai ai1 || + (ai+1 ai )/||ai+1 ai ||.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 259
Doubling-and-Bisection Heuristic for Biarc Approximation
I [Eibl&Held 2005] Doubling-and-bisection heuristic for finding maximal biarcs.
I Suppose we are to start in a-node a1 , with a-nodes numbered consecutively.
I Doubling: Successively try k := 1, 2, 3, . . . and check whether a valid biarc exists
(within the tolerance zone) between a1 and a2k .
I Bisection: If biarc to a2k is valid and biarc to a2k +1 is not valid then apply bisection
between a-node indices 2k and 2k +1 .
I Validity check for a biarc can be restricted to a strip within the tolerance band!
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 260
Sample Biarc Approximation
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 263
Sample Biarc Approximation
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 264
Theoretical Results on Biarc Approximation
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 265
Uniform Cubic B-Spline Approximation
I Since consecutive B-spline segments share a common set of control vertices
rather than only one a-node, there is no obvious way how a greedy scheme is
adapted to support a B-spline approximation.
I [Held&Kaaser 2014]: Recursive subdivision heuristic for finding maximal uniform
cubic B-splines.
I For every profile of P, compute an initial B-spline curve that consists of a small
number of segments.
I This initial approximation curve is then refined by subsequently adding a-nodes
as new control vertices until an approximation curve that fits through the
tolerance zone is obtained.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 266
B-Spline Intersection Checking
I Use de Boors algorithm to subdivide a spline segment, and recurse on the two
halves. If the maximum intersection tolerance is reached then report an
intersection.
I One may have to check one B-spline segment ucbs for intersection with several
straight-line segments of the boundary of the tolerance zone.
I Recall that the B-spline subdivision follows a regular pattern.
I Hence, one might end up computing the same control vertices over and over
again.
I One can save computational time by storing the control vertices in a binary tree
T , where each node of T corresponds to one subdivision.
I During an intersection check with a line segment one starts at the root of T
control vertices are not stored in T then these vertices are computed and
stored.
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 268
Sample Approximation by Uniform Cubic B-Splines
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 269
Sample Approximation by Uniform Cubic B-Splines
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 270
Shortcomings of VD-Based Tolerance Zones
I The Voronoi diagram allows to filter noisy input without preprocessing, and the
tolerance zones allow to assert important properties of the approximation, but
VD-based tolerance zones need not support optimum approximations!
dl
dr dr
dl
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 271
Shortcomings of A-Nodes
I A-nodes are a convenient means for obtaining control points for B-splines or
support for biarcs, but an inappropriate placement of the a-nodes may cause the
number of approximation primitives to sky-rocket!
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 272
The End!
I hope that you enjoyed this course, and I wish you all the best for your future studies.
UNIVERSITAT SALZBURG
Computational Geometry and Applications Lab
c
M. Held (Univ. Salzburg) Geometric Modeling (WS 2016/17) 273