Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 38

3 D Object Representation

Dec 8, 2021 3D Object Representation 1


Spline Representations
 Spline: In drafting terminology
 A flexible strip used to produce a smooth curve through a
designated set of points.
 Several small weights are distributed along the strip.
 Spline Curve: In computer graphics
 Any composite curve formed with (cubic) polynomial
sections satisfying specified continuity conditions at the
boundary of the pieces.
 Spline surface
 Described with two sets of orthogonal spline curves.

Dec 8, 2021 3D Object Representation 2


Interpolation and Approximation Splines
 Control points
 A set of coordinate positions which indicates the general
shape of the curve.
 A spline curve is defined, modified, and manipulated with
operations on the control points.
 Interpolation curves: the curve passes through each control
points
 Digitize drawings
 Specify animation path
 Approximation curves: fits to the general control-points path
without necessarily passing through any control points
Dec 8, 2021 3D Object Representation 3
Interpolation and Approximation Splines

Dec 8, 2021 3D Object Representation 4


Convex hull
 The convex polygon boundary that encloses a set of
control points.
 Provide a measure for the deviation of a curve or
surface from the region bounding the control points

Dec 8, 2021 3D Object Representation 5


A convex hull for 2 sets of control points
Control graph
 A set of connected line segments connecting the
sequence of control points.

Dec 8, 2021 3D Object Representation 6


Parametric Continuity
 Continuity conditions
 To ensure a smooth transition from one
section of a piecewise parametric curve to
the next.

 Zero-order (C0) continuity


 First-order (C1) continuity
 Second-order (C2) continuity
Dec 8, 2021 3D Object Representation 7
Zero-order (C0) continuity
 Simply the curves
meet.

Dec 8, 2021 3D Object Representation 8


First-order (C1) continuity
 First parametric derivatives
(tangent lines) of the co
ordinate functions of 2
successive curves are equal at
their joining point.
 Parametric coordinate form
 x =x(u),
 y=y(u)
 z=z(u) u1<=u<=u2
Dec 8, 2021 3D Object Representation 9
Second-order (C2) continuity
 Both first and
second parametric
derivatives of the 2
curve sections are
the same at
intersection.

Dec 8, 2021 3D Object Representation 10


Parametric Continuity

Dec 8, 2021 3D Object Representation 11


Spline Specifications
 Three methods for specifying a spline
 A set of boundary conditions imposed on
the spline.
 The matrix that characterizes the spline.
 The set of blending functions (or basis
functions)

Dec 8, 2021 3D Object Representation 12


1.Boundary Conditions
 Suppose x(u)=axu3+bxu2+cxu+dx
be the cubic polynomial representation
 Endpoints coordinates - x(0) and x(1).
 First derivatives at the endpoints x’(0) and
x’(1).
 Determine the values of ax, bx, cx, and dx.
 Form the matrix from the boundary conditions.
Dec 8, 2021 3D Object Representation 13
2.Matrix Representation

 U - row matrix of parameter u , C – Coefficient column


matrix.
 C = Mspline . Mgeom
 Mgeom – control point coordinate values(4 element column
matrix
 Mspline – 4x4 matrix – characterization for the spline curve
 x(u) = U. Mspline . Mgeom
Dec 8, 2021 3D Object Representation 14
3.Blending Function

 gk- constant parameters such as control


points, slope of curve at the control points.
 BFk(u) – blending func

Dec 8, 2021 3D Object Representation 15


Bezeir Curves and Surfaces

Dec 8, 2021 3D Object Representation 16


“Computers can’t draw curves.”

The more points/line


segments that are used,
the smoother the
curve.

Dec 8, 2021 3D Object Representation 17


Bezier Curves
 An alternative to splines.
 M.Bezeir a French mathematician who
worked for the Renault motor car company.
 He invented his curves to allow his firm’s
computers to describe the shape of car bodies.

Dec 8, 2021 3D Object Representation 18


Bezier Approximation
P2 P3
How to provide R1 and R4 ?
R1 R4

P4
P4 P1
P1 Instead of providing R1 and R4 , provide two additional control points ! ! !

P2 and P3

 Approxi mation
Dec 8, 2021 3D Object Representation 19
Bezier Curves Contd
 Typically, cubic polynomials
 Need four points
 Two at the ends of a segment
 Two control tangent vectors

Dec 8, 2021 3D Object Representation 20


Bezier Curves Contd

 Control polygon: control points connected to


each other

 Easy to generalize to higher order


 Insert more control points
Dec 8, 2021 3D Object Representation 21
De Casteljau Algorithm
 Can compute any point on the curve in a few
iterations.
 No polynomials, pure geometry.
 Repeated linear interpolation
 Repeated order of the curve times
 The algorithm can be used as definition of the
curve.

Dec 8, 2021 3D Object Representation 22


De Casteljau Algorithm Contd

Dec 8, 2021 3D Object Representation 23


De Casteljau Algorithm Contd

Dec 8, 2021 3D Object Representation 24


De Casteljau Algorithm Contd

Dec 8, 2021 3D Object Representation 25


De Casteljau Algorithm Contd

Dec 8, 2021 3D Object Representation 26


De Casteljau Algorithm Contd
P1 1 t t P2
t 1 t
t 1 t 1 t t
t

1 t

P3
P0
1 t P0
(1 t ) P0  tP1 1 t
t (1 t ) 2 P0  2(1 t )tP1 (1 t ) 3 P0
1 t
P1 1 t t 2P2  3(1 t ) 2 tP1
t
(1 t ) P1  tP2 t  3(1 t )t 2 P2
1 t
t (1 t ) 2 P1  2(1 t )tP2 t 3P3
P2 1 t t t 2 P3
3
 3
t
(1 t ) P2  tP3   
i 
i 0 
(1 t ) i 3i
t

P
Dec38, 2021 3D Object Representation 27
Cubic Bezeir Curve -Matrix
Representation
 1 3 3 1  P1 
 3 6 3 0  P2 

Q (t )  t 3 t 2 t 1 
 3

3 0 0  P3 
  
 1 0 0 0  P4 
 T  M b  Gb 1 (1  t )3
t3
3t (1-t ) 2
Q (t )  (1  t ) 3 P1  3t (1-t ) 2 P2  3t 2 (1-t ) P3  t 3 P4
3t 2 (1-t )
 3 i
3
    t (1  t ) 3i Pi , 0  t  1
i 0  i 

0 1
(t  (1  t )) 3

Dec 8, 2021 3D Object Representation 28


Bezier Polynomial Function

n! n i
Bin (t )  .t .(1  t )
i

i!(n  i )!

Dec 8, 2021 3D Object Representation 29


Parametric Equations for x(t),y(t)
n
x(t )   xi .Bin (t )
i 0

n
y (t )   y .B
i 0
i in (t )

Dec 8, 2021 3D Object Representation 30


Cubic Bezeir func in Matrix Form

Normal matrix form

In cubic matrix form

Dec 8, 2021 3D Object Representation 31


Cubic Bezier Curves Contd
 Bezeir matrix is

Dec 8, 2021 3D Object Representation 32


Design Techniques Using Bezier Curves
 Closed Bezier curves
 Specifying the first and last control points
at the same position.

Dec 8, 2021 3D Object Representation 33


Design Techniques Using Bezier Curves
Contd
 Multiple control points
 Specify multiple control points at a single
co ordinate position gives more weight to
that position.

Dec 8, 2021 3D Object Representation 34


Design Techniques Using Bezier Curves
Contd
 When complicated curves are to be generated

 Formed by piecing several bezeir sections


of lower degree together.

Dec 8, 2021 3D Object Representation 35


Bezier Surfaces
 Two sets of orthogonal Bezeir curves can be used to design an
object surface by specifying an input mesh of control points.
 The parametric vector function is formed as the Cartesian
product of Bezier blending functions

m n
P (u, v )   p j ,k BEZ j ,m (v )BEZ k ,n (u )
j 0 k 0

 pi,k specifying the location


 Each curve of constant u is plotted by varying v over the interval
0 to 1, with u fixed at one of the values in this unit interval.

Dec 8, 2021 3D Object Representation 36


Bezier Surfaces Contd
 Control points connected by dashed lines
 Solid lines show curves of constant u and constant v

Dec 8, 2021 3D Object Representation 37


Thank You…

Dec 8, 2021 3D Object Representation 38

You might also like