Professional Documents
Culture Documents
3D Object Representation
3D Object Representation
3D Object Representation
3D Object Representation
Shmuel Wimer
Bar Ilan Univ., School of Engineering
June 2010 2
Spline Representation
Spline is a flexible strip used to produce a smooth curve through a set of
points. Splines are used to design curve and surface shapes like automobile
bodies, aircrafts, home appliances and more.
Cubic splines are most popular. given a set of 1 control points
, , , 0,1, , , a cubic interpolation fits the points.
k k k k
n
x y z k n
+
= = p
0
p
n
p
k
p
1 k +
p
3 2 3 2
3 2
,
, 0 1.
x x x x y y y y
z z z z
x u a u b u c u d y u a u b u c u d
z u a u b u c u d u
= + + + = + + +
= + + +
June 2010 3
At each of n-1 internal point we require that two successive curve sections
pass through that point and also the equality of their 1
st
and 2
nd
derivatives,
thus imposing 4(n-1) equations of 4n polynomial coefficients. Two more
equations are obtained from passing through the first and last points. The
last two equations can be obtained by requiring the 2nd derivative at first
and last points to be zero.
A major drawback is that a change in the position of one control point needs
recalculation of all coefficients. This is solved by specifying the tangent at
each control point. Then, a change in position of one point affects only two
sections of the curve. This is called Hermite interpolation.
, , u x u y u z u = P
k
p
1 k+
p
1 1
0 0
1 1
k k
k k + +
' = =
' = =
P p P Dp
P p P Dp
is parametric derivative (curve slope).
k
Dp
June 2010 4
3 2
3 2
There is , 0 1. The component of is
and similarily for and .
x x
u u u u u x u
x u a u b u cu d y z
= + + +
= + + +
P a b c d P
3 2 2
1 , 3 2 1 0 u u u u u u u
' = =
| |
| |
a a
b b
P P
c c
d d
1 1
1 1
0 0 0 1 2 2 1 1
1 1 1 1 3 3 2 1
0 0 1 0 0 0 1 0
3 2 1 0 1 0 0 0
k k
k k
k k
k k
H
+ +
+ +
= =
| | | | | |
p p a a
p p b b
Dp Dp c c
Dp Dp d d
M
+
+
+
= =
|
| |
+ + + +
|
+ + +
|
p
p
P
p
p
M
p p
p
3 2
2
3
CAR
k
su su
u
+
+ p
CAR , 0,1, 2, 3, are called
i
u i = Cardinal Blending Functions.
June 2010 9
There are few more splines with more parameters than tension, designed
to model animation paths with abrupt changes in motion.
June 2010 10
Bezier Spline Curves
Developed by Pierre Bezier at Renault corporation for the design of automobile
bodies. Bezier splines are very useful for design of curves and surfaces.
0
,
0
,
Let , , , 0 , be 1 control points, blended
to create a position vector describing a path from to .
BEZ , 0 1, where
!
BEZ , 1 , ,
! !
k k k k
n
n
k k n
k
n k
k
k n
x y z k n n
u
u u u
n
u C n k u u C n k
k n k
=
= +
=
= =
p
P p p
P p
Bezier curve is a polynomial of degree one less the number of control points.
Coefficients and blending functions satisfy recursive relations as follows:
June 2010 11
, , 1 1, 1
, 0,
1
, , 1 ,
BEZ 1 BEZ BEZ , 1, with
BEZ and BEZ 1 .
k n k n k n
k
k
k k k
n k
C n k C n k n k
k
u u u u u n k
u u u u
+
= >
= + > >
= =
0
p 2
p
1
p
1
p
2
p
3
p
0
p
0
p
7
p
June 2010 12
Properties of Bezier Curves
0
A useful property is that the curve connects to first and last control
points: 0 , 1 .
n
= = P p P p
0 1 1
The parametric derivative at the end control points is given by:
0 , 1 .
The slope of the cure at the ens points is along the line joining the
last two end points.
n n
n n n n
' '
= + = + P p p P p p
2 1 1 0
2 1 1
The parametric second derivatives is given by:
0 1 ,
1 1 ,
n n n n
n n
n n
'' =
|
'' =
|
P p p p p
P p p p p
June 2010 13
,
Another important property of any Bezier curve is its containment in the
convex hall of the control point. This follows from being a positive
sum of the control points where sum of weights is BEZ
k n
u P
0
1.
n
k
u
=
=
=
|
| |
p
p
P
p
p
M
2 2 3 2
1
3 3 2
x k x x k x x x
k
a u a b u a b c
x
H H H H H H + + + +
A
+ +
1 1 1 1 2
1
2
2 3 2
1
2
1
3 2
2
is quadratic polynomial of . . Substitution
of in yields
= 3
6 6 2
3 2
k k k k
k k
k k x k
x k x x
k
x x k x x x
k k
x u x x x
u x
x u a u a b u a b c
x u a u a b
x
H
H H H H H H H H
H
H
H H
+
A A = A + A
+ A
A + +
+
+ + + + + +
A
A
=
+ +
June 2010 18
,
2
2
3
3
3 2
2
Similarily,
6 6 2 6
k k x k x x k x
k
a x u a u a b x
x
H H H H H H A + = + + + =
A
A +
3 2
0 0 0 1 0
3 2 3
2 0
At there exists 0. Hence , ,
6 2 and 6 .
x x x x
x x x
x u x d x a b c
x a b a
H H H
H H H
= = A = + +
A = +
1 0 1 2 1 1 2 3 2 1 2 3
4 1 1
3 1 2 3
Then , , and .
can be derived from by considering as a starting point
and progressing with 3 forward differences.
Hence 3 2 , requiring only 3 add
i i
x x x x x x
x x x
x x
+
= + A = + A + A = + A + A + A
= + A + A + A itions for
eavery new point.