Set your presentation theme:
Black (default) -
White -
League -
Sky -
Beige -
Simple
Serif -
Blood -
Night -
Moon -
Solarized
H:
Jean Pierre Charalambos
Universidad Nacional de Colombia
Presentation best seen online
See also the source code
H:
- Intro
- Cubic natural splines
- Cubic Hermit splines
- Bézier curves
H:
Example: Bezier curve defined from $0 \leq u \leq 1$V:
Join line segments using a $\Delta u$ over $[0..1]$V:
A Bézier patch and its 16 control pointsV:
Computing the point $(u, v)$ on the Bézier surfaceV:
ExampleV:
Find the piecewise interpolation polynomial(s) of degree
$n$ ($P(u) = c_nu^{n} + c_{n-1}u^{n-1} + ... + c_1u + c_0u^{0}$) that best approximate a given a set of control points
V:
Inkscape
V:
V:
Surface model
V:
Font modelling
V:
- Curve fits the interpolation
- Curve approximates the interpolation
- Convex hull
- Control polygon
V:
V:
Intro: Continuity
Geometric
Parametric
Observation
-
$C^{1} \rightarrow G^{1}$ but not the other way around - If
$n > m$ then$C^{n} \rightarrow C^{m}$
H:
Cubic natural splines: problem statement
For each spline section:
\[x(u) = a_x u^{3} + b_x u^{2} + c_x u + d_x\] \[y(u) = a_y u^{3} + b_y u^{2} + c_y u + d_y\] \[z(u) = a_z u^{3} + b_z u^{2} + c_z u + d_z\]
V:
Cubic natural splines: problem statement
Which may be written vectorially as:
hence
\[P(u) = \begin{bmatrix} u^{3} & u^{2} & u & 1 \cr \end{bmatrix} \bullet \begin{bmatrix} a & b & c & d \cr \end{bmatrix}^{T} = U \bullet C\] \[ P'(u) = \begin{bmatrix} 3u^{2} & 2u & 1 & 0 \cr \end{bmatrix} \bullet \begin{bmatrix} a & b & c & d \cr \end{bmatrix} ^{T} = U' \bullet C\] \[ P''(u) = \begin{bmatrix} 6u & 2 & 0 & 0 \cr \end{bmatrix} \bullet \begin{bmatrix} a & b & c & d \cr \end{bmatrix} ^{T} = U'' \bullet C\]
We have
V:
Cubic natural splines: problem statement
Since there's
-
$n$ piecewise sections -
$4n$ polynomial coeficients (unknowns)
V:
Cubic natural splines: solution
Specification from
- For each
$n-1$ intermediate control points we have$4$ equations ($4n-4$ equations in total):
- Positions (2 equations)
- 1st and 2nd derivatives (2 equations)
- For the 2 extreme control points we have
$2$ equations ($4$ in total):
- Positions (2 equations)
- The second derivatives should be 0 (2 equations)
Details here
H:
Cubic Hermit splines
We get the following equations:
$p_k = P(0) = d$ $p_{k+1} = P(1) = a+b+c+d$ $Dp_k = P'(0) = c$ $Dp_{k+1}= P'(1) = 3a + 2b + c$
V:
Cubic Hermit splines
$p_k = P(0) = d$ $p_{k+1} = P(1) = a+b+c+d$ $Dp_k = P'(0) = c$ $Dp_{k+1}= P'(1) = 3a + 2b + c$
which may be written as:
$\begin{bmatrix} p_k \cr p_{k+1} \cr Dp_k \cr Dp_{k+1} \cr \end{bmatrix} = \begin{bmatrix} 0 & 0 & 0 & 1 \cr 1 & 1 & 1 & 1 \cr 0 & 0 & 1 & 0 \cr 3 & 2 & 1 & 0 \cr \end{bmatrix} \begin{bmatrix} a \cr b \cr c \cr d \cr \end{bmatrix} $
V:
Cubic Hermit splines
Solving for
`$\begin{bmatrix} a \cr b \cr c \cr d \cr \end{bmatrix}
\begin{bmatrix} 2 & -2 & 1 & 1 \cr -3 & 3 & -2 & -1 \cr 0 & 0 & 1 & 0 \cr 1 & 0 & 0 & 0 \cr \end{bmatrix} \bullet \begin{bmatrix} p_k \cr p_{k+1} \cr Dp_k \cr Dp_{k+1} \cr \end{bmatrix} $`
V:
Cubic Hermit splines
Matrix form
| \\[M_H = \begin{bmatrix} 2 & -2 & 1 & 1 \cr -3 & 3 & -2 & -1 \cr 0 & 0 & 1 & 0 \cr 1 & 0 & 0 & 0 \cr \end{bmatrix}\\] |
$P(u) = p_k(2u^{3}-3u^{2}+1)+p_{k+1}(-2u^{3}+3u^{2})$
$+ Dp_k(u^{3}-2u^{2}+u)+Dp_{k+1}(u^{3}-u^{2})$
V:
Cubic Hermit splines: Basis functions
$P(u) = p_k(2u^{3}-3u^{2}+1)+p_{k+1}(-2u^{3}+3u^{2})$
$+ Dp_k(u^{3}-2u^{2}+u)+Dp_{k+1}(u^{3}-u^{2})$
$P(u) = p_k H_0(u)+p_{k+1} H_1(u)+Dp_k H_2(u)+Dp_{k+1} H_3(u)$
The polynomials
V:
Cubic Hermit splines: examples and continuity
V:
Cubic Hermit splines: Cardinal splines
if within a Hermite spline we choose
$P(0)=P_k$$P(1)=P_{k+1}$$P'(0)=1/2(1-t)(P_{k+1}-P_{k-1})$$P'(1)=1/2(1-t)(P_{k+2}-P_k)$
where
For
V:
Cubic Hermit splines: Cardinal splines
$P(u)=\begin{bmatrix} u^{3} & u^{2} & u & 1\end{bmatrix} \bullet M_C \bullet \begin{bmatrix} P_{k-1} \cr P_k \cr P_{k+1} \cr P_{k+2} \end{bmatrix}$
$ M_c =\begin{bmatrix} -s & 2-s & s-2 & s\cr 2s & s-3 & 3-2s & -s \cr -s & 0 & s & 0\cr 0 & 1 & 0 & 0 \cr \end{bmatrix}$
where
V:
Cubic Hermit splines: Cardinal splines
$P(u)=p_{k-1}(-su^{3}+2su^{2}-su)+p_k[(2-s)u^{3}+(s-3)u^{2}+1]$
$+p_{k+1}[(s-2)u^{3}+(3-2)u^{2}+su]+p_{k+2}(su^{3}-su^{2})$
$=p_{k-1} CAR_0(u)+p_k CAR_1(u)+p_{k+1} CAR_2(u)+ p_{k+2} CAR_3(u)$
The polynomials
H:
Bézier curves: De Casteljau algorithm
Check this video
V:
Bézier curves: overview
Check also this one
V:
Bézier curves: definition
We have
$P(u)= \sum P_k BEZ_{k,n}(u), k=0,1,2,...,n$
V:
Bézier curves: Bernstein polynomials
$BEZ_{k,n}(u)=C(n,k)u^{k}(1-u)^{n-k}$
$BEZ_{k,n}(u)=(1-u)BEZ_{k,n-1}(u)+u BEZ_{k-1,n-1}(u), n > k \ge 1$
$BEZ_{k,k}(u)=u^{k}$
$BEZ_{0,k}(u)=(1-u)^{k}$
$C(n,k)=n!/(k!(n-k)!)$
$C(n,k)=C(n,k-1)(n-k+1)/k,n>k$
V:
Bézier curves: Properties
- A Bézier curve can be split into two Bézier curves
- A Bézier curve is a polynomial of degree
$n$ (one less than the total number of control points) - The curve interpolates the first and last control points
$P(0)=p_0$ $P(1)=p_n$
- The start and end of the curve is tangental to the start and end section of the control polygon
$P'(0)=-n p_0 +n p_1$$P'(1)=-n p_{n-1} + n p_n$
- The curve lies within the (control points) convex hull
$\sum BEZ_{k,n}(u)=1, k=0,1,2,...,n$
V:
Bézier curves: Design techniques
Joining Bézier segments
Property 3: The start and end of the curve is tangental to the start and end section of the control polygon
Example for 
V:
Bézier curves: Cubic splines
Basis functions
Let
$BEZ_{0,3}(u)=(1-u)^{3}$$BEZ_{1,3}(u)=3u(1-u)^{2}$$BEZ_{2,3}(u)=3u^{2}(1-u)$$BEZ_{3,3}(u)=u^{3}$
$P(u) = p_0 BEZ_{0,3}(u) + p_1 BEZ_{1,3}(u) + p_2 BEZ_{2,3}(u) + p_3 BEZ_{3,3}(u)$
V:
Bézier curves: Cubic splines
Basis functions
The polynomials
`$BEZ_{0,3}(u)$` (blue), `$BEZ_{1,3}(u)$` (green), `$BEZ_{2,3}(u)$` (red) and `$BEZ_{3,3}(u)$` (cyan)
V:
Bézier curves: Cubic splines
Matrix form
... which is the same as:
$P(u)=\begin{bmatrix}u^{3} & u^{2} & u & 1 \end{bmatrix} \bullet M_{Bez} \bullet \begin{bmatrix} p_0 \cr p_1 \cr p_2 \cr p_3 \cr \end{bmatrix} $
$M_{Bez} =\begin{bmatrix} -1 & 3 & -3 & 1 \cr 3 & -6 & 3 & 0 \cr -3 & 3 & 0 & 0 \cr 1 & 0 & 0 & 0 \cr \end{bmatrix} $
H:
References
- Mathematics of Computer Graphics and Virtual Environments
- Pyramid Algorithms, Goldman
- Some linear equation solvers:






