Академический Документы
Профессиональный Документы
Культура Документы
Presented by :MR.s.Vimal,M.E.,M.B.A
Asst.Prof / IT
UNIT - 2
THREE-DIMENSIONAL CONCEPTS
SYLLABUS
N=(A,B,
C)
Plane Equations
Plane Equations
Identify a point (x, y, z) as either inside or outside a
plane surface
In a right-handed coordinate system, the plane
parameters A, B, C, and D were calculated using
vertices selected in a counterclockwise order when
viewing the surface in an outside-to-inside direction.
Sphere
x y z r
2 2 2 2
x r cos cos
/ 2 / 2
y r cos sin
z r sin
Quadric Surfaces
2
y z
2 2
x
Ellipsoid 1
r r r
x y z
x rx cos cos
/ 2 / 2
y ry cos sin
z rz sin
Quadric Surfaces
2
2
x y
2 2
Torus
r z 1
r
x y
r rz
x rx ( r cos ) cos
y ry ( r cos ) sin
z rz sin
Torus
Superquadrics
A generalization of the quadric representations
Incorporate additional parameters into the quadric equations
The number of additional parameters used is equal to the
dimension of the object.
Superellipse 2/s
y
2/s
x
1
r
rx y
x rx cos s
y ry sin s
Superquadrics
Superellipsoid
s2
x 2 / s2 y 2 / s2 s1
z
2 / s1
1
rx r
y rz
x rx cos cos
s1 s2
/ 2 / 2
y ry cos sin
s1 s2
z rz sin s1
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
There are several different kinds of spline specifications
Superellipse
Interpolation and Approximation
Splines
Control points
A set of coordinate positions 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
Design tools to structure surfaces
To see microsoft word
Interpolation and Approximation
Splines
Interpolation and Approximation
Splines
Convex hull
The convex polygon boundary encloses a set of control
points.
Provide a measure for the deviation of a curve or
surface from the region bounding the control points
Interpolation and Approximation
Splines
Control graph (control polygon, characteristic polygon)
Parametric Continuity
Continuity conditions
To ensure a smooth transition from one section of a
piecewise parametric curve to the next.
Set parametric continuity by matching the parametric
derivatives of adjoining curve sections at their common
boundary.
Zero-order (C0) continuity
First-order (C1) continuity
Second-order (C2) continuity
The rates of change of the tangent vectors for
connecting sections are equal at their intersection.
Parametric Continuity
Geometric Continuity
Geometric continuity
C2
p0
Parametricpderivatives
1 of the two
p2 sections to be
proportional
C1 to each other at the joint
Zero-order geometric continuity (G0)
C3
First-order
p0 geometric continuity (G1)
p1 p2
Second-order geometric continuity (G2)
C1
With geometric continuity, the curve is pulled
toward the section with the greater tangent
vector.
Spline Specifications
Three methods for specifying a spline
A set of boundary conditions imposed on the spline
The matrix characterizes the spline
The set of blending functions (or basis functions)
Boundary conditions
x(u)=axu3+bxu2+cxu+dx 0<=u<=1
On the endpoints x(0) and x(1).
First derivatives at the endpoints x(0) and x(1).
Determine the values of ax, bx, cx, and dx.
Spline Specifications
Cubic Spline Interpolation
Methods
Cubic polynomials
Offer a reasonable compromise between
flexibility and speed of computation.
Compared to higher-order polynomials
Less calculations and memory
More stable
Compared to lower-order polynomials
More flexible for modeling arbitrary curve
shapes
Cubic Spline Interpolation Methods
pk 1
p
p ( u ) [u 3 u 2 u 1] M C k
pk 1
k 2
p
S 2 S S 2 S
2S S 3 3 2S S Where s = (1-t)/2
MC
S 0 S 0
0 1 0 0
Cardinal Splines
Expanding matrix equation into polynomial form
p(u ) pk 1 ( su 3 2 su 2 su ) pk [( 2 s )u 3 ( s 3)u 2 1]
pk 1[( s 2)u 3 (3 2 s )u 2 su )] pk 2 ( su 3 su 2 )
pk 1CAR0 (u) pk CAR1 (u) pk 1 pk 1CAR2 (u) pk 2 pk 1CAR3 (u)
Bezier Curves
A spline approximation method
Developed by Pierre Bezier
Renault automobile bodies
Given n + 1 control points
n
p(u ) pk BEZ k ,n (u ) 0 u 1
k 0
Bernstein polynomials
BEZ k ,n (u) C(n, k )uk (1 u)nk
BEZ k ,n (u ) (1 u ) BEZ k ,n 1 (u ) uBEZ k 1,n 1 (u )
n k 1
Bezier Curves
The degree of the Bezier polynomial
One less than the number of control points used.
The relative position of control points
With certain placements, we obtain degenerate
Bezier polynomials.
Properties of Bezier Curves
BEZ
k 0
k ,n (u ) 1
Its parametric
vector function
is formed as
the Cartesian
product of
Bezier
blending
functions
Bezier Surfaces
A Composite Bezier Surfaces
B-Spline Curves
B-splines have two advantages over Bezier
splines:
The degree is independent of the number of control
points.
Allow local control of the shape.
Blending function formulation
n
P(u ) pk Bk ,d (u ) umin u umax 2 d n 1
k 0
B
k 0
k ,d (u ) 1
Pstart = P1 -P0
p0
p3 Pend = P3 -P2
x
z
Right hand coordinate system
X x Y = Z ; Y x Z = X; Z x X = Y;
Y
y
x
+z
x
homogeneous coordinates
3D transformation
Translation
Very similar to 2D transformation
Translation
x = x + tx; y = y + ty; z = z + tz
X 1 0 0 tx X
Y 0 1 0 ty Y
=
Z 0 0 1 tz Z
1 0 0 0 1 1
homogeneous coordinates
Scaling
X = X * Sx; Y = Y * Sy; Z = Z * Sz
X Sx 0 0 0 X
Y 0 Sy 0 0 Y
=
Z 0 0 Sz 0 Z
1 0 0 0 1 1
3D ROTATION
+ x
z
Rotation
cos() 0 sin() 0
x
0 1 0 0
-sin() 0 cos() 0
0 0 0 1
+ z
1 0 0 0
z
0 cos() -sin() 0
0 sin() cos() 0
0 0 0 1
+ y
OpenGL - glRotatef(, 1,0,0) x
Computer Animation
Lets talk about computer
animation
Must generate 30 frames per second of
animation (24 fps for film)
Issues to consider:
Is the goal to replace or augment the artist?
What does the artist bring to the project?
Morphing
Motion Specifications
Direct Motion Specification
Goal Directed Systems
Kinematics & Dynamics