lecture 4 [compatibility mode]
TRANSCRIPT
-
8/2/2019 Lecture 4 [Compatibility Mode]
1/26
Mathematical Representation of
Curves
ME C382: COMPUTER AIDED DESIGN
1
-
8/2/2019 Lecture 4 [Compatibility Mode]
2/26
Disadvantages of Non-parametric Representations
Explicit non-parametric representation can not be used forclosed curves (like circles) and multi-valued curves (likeparabolas). Because it is a one-to-one relationship.
The above problem is overcome by implicit representation butthe latter is laborious.
Implicit representation requires that two surface equations besolved for y and z for a given value of x
Infinite slope situations can not be dealt with in computerprogram
Shapes of most objects are coordinate system independent.
2
-
8/2/2019 Lecture 4 [Compatibility Mode]
3/26
Parametric Representation: Advantages
It overcomes all difficulties of the non-
parametric representations
It allows multi-valued and closed functions tobe easily defined
tangent vectors
The equations are polynomials and thus
computationally more suitable than equationsinvolving roots
3
-
8/2/2019 Lecture 4 [Compatibility Mode]
4/26
PARAMETRIC CURVES
PARAMETRIC CUBIC CURVE
HERMITE CURVE
4
-
8/2/2019 Lecture 4 [Compatibility Mode]
5/26
PARAMETRIC CURVES
Classification
Plane Curves & Space Curves
Eg Circle v/s Helix
Circle v/s Bezier Curve
Interpolation curve v/s Approximation curves
Hermite Curves v/s Bezier curve
5
-
8/2/2019 Lecture 4 [Compatibility Mode]
6/26
Parametric Form of a Curve
In parametric form, each point on a curve isexpressed as a function of a parameter u.
The parameter acts as a local coordinate forpoints on the curve
The parametric equation for a 3-D curve in space
P(u) = [ x y z]T = [ x(u) y(u) z(u)]T,
umin u umax
Coordinates of a point on the curve are thecomponents of its position vector.
6
-
8/2/2019 Lecture 4 [Compatibility Mode]
7/26
PARAMETRIC REPRESENTATION OF LINES
121
121
121
10)(
)(
toequivalentisThis
10)PP(PP:1
+=
+=
+=
uyyuyy
xxuxx
uuMethod
1
1
121
PP
bygivenisandparameterthelikeactwillitself
nPP
:2)(
=
+=
+=
L
L
LL
Methodzzuzz
7
-
8/2/2019 Lecture 4 [Compatibility Mode]
8/26
Circle
The parametric equation of a circle (in the x-y plane)is
x = xc + R cos(u)
y = yc + R sin(u) 0 u 2
z = zc
Thus, determination of the radius (R) and center of the
circle (xc, yc) is necessary (and is sufficient) forparametric representation of a circle.
8
-
8/2/2019 Lecture 4 [Compatibility Mode]
9/26
u=0
u=2P = x z
P=(x, y, z)
Pn=(xn, yn, zn)Pn+1=(xn+1, yn+1, zn+1)
u=
u
9
Pc
u=3/2
-
8/2/2019 Lecture 4 [Compatibility Mode]
10/26
Computation Of Parametric Circle For Computer Display
x = xc + R cos(u)y = yc + R sin(u) 0 u 2
z = zc
xn+1 = xc + R cos(u+u)yn+1 = yc + R cos(u+u)
zn+1 = zn
Expanding the trigonometric terms and simplifyingxn+1 = xc + (xn xc) cos(u) - (yn yc) sin(u)
yn+1 = yc + (yn yc) cos(u) + (xn xc) sin(u)
zn+1 = znTrigonometric terms have to be calculated only once for
a given u.
10
-
8/2/2019 Lecture 4 [Compatibility Mode]
11/26
Ellipse Two cases of ellipses
we will consider:Basic Ellipse, = 0
,
11
-
8/2/2019 Lecture 4 [Compatibility Mode]
12/26
Basic Ellipse
x = xc + A cos(u)
y = yc + B sin(u) 0 u 2
z = zc
12
u
P
-
8/2/2019 Lecture 4 [Compatibility Mode]
13/26
Ellipse
x = xc + A cos(u)y = yc + B sin(u) 0 u 2
z = zc
P=(x, y, z)
Pn=(xn, yn, zn)
u
Pn+1=(xn+1, yn+1, zn+1)
13
u=0
u=2Pc=(xc, yc, zc)
Pc
u=3/2
u=
-
8/2/2019 Lecture 4 [Compatibility Mode]
14/26
Computation Of Parametric Basic Ellipse For Computer Display
xn+1 = xc + (xn xc) cos(u) (A/B)(yn yc) sin(u)
yn+1 = yc + (yn yc) cos(u) + (A/B)(xn xc) sin(u)
zn+1 = zn
14
-
8/2/2019 Lecture 4 [Compatibility Mode]
15/26
PARAMETRIC REPRESENTATION OF SYNTHETICCURVES
15
-
8/2/2019 Lecture 4 [Compatibility Mode]
16/26
What are synthetic curves?
Synthetic curves represent a curve fitting problem toconstruct a smooth curve that passes through given datapoints. Polynomials are the typical forms.
Synthetic curves take up where the analytic curves leave the latter are not that efficient at geometric design ofmechanical parts
Some examples of complex geometric design are:
Car bodies
Ship hulls Airplane fuselage and wings
Propeller blades
Shoe insoles
Aesthetically designed bottles
16
They are to be made by free-form curves and surfaces.
-
8/2/2019 Lecture 4 [Compatibility Mode]
17/26
Need for synthetic curves?
Need for synethetic curves arises intwo occassions:
When a curve is represented by acollection of measured data points, and
When an existing curve must change tomeet new desi n re uirements the
designer needs a curve representationthat is directly related to the datapoints and is flexible enough to bend,twist or change the shape by changing
one or more data points.
17
-
8/2/2019 Lecture 4 [Compatibility Mode]
18/26
Most commonly used Synthetic Curves Hermite Cubic Spline
Each curve segment is defined for only 2 control points; It passes
through the control points and therefore it is an interpolant
It has only upto C1 continuity
Bezier Curve
oes no pass roug e con ro po n s u on y approx ma es
the trend
It also has only upto C1 continuity
B-Spline Curve
It is also most generally an approximator; an interpolating B-Spline
is also sometimes possible
It has upto C2 continuity
18
-
8/2/2019 Lecture 4 [Compatibility Mode]
19/26
Hermite Cubic Spline Curve Segment
They are used to interpolate the given data butnot to design free-form curves. (Cubic) Splines derive their name from French
curves or splines
Hermite cubic spline is one type of generalparametric cubic spline with degree equal to 3and being determined by two data points and
. Hermite Cubic Spline can be a 3-D planar curve or
3-D twisted curve. Algebaric Form
Geometric Form Four Point Form
19
-
8/2/2019 Lecture 4 [Compatibility Mode]
20/26
Parametric Equation of Hermite Cubic Spline Segment
10,)(3
0
==i
ii uuCuP
tscoefficeinalgebraic)(orPolynomial
parameter
=
=
iC
u
20
-
8/2/2019 Lecture 4 [Compatibility Mode]
21/26
)(
formvectorexpandedIn
)(
)(
)(
aswrittenisequationthisformscalarIn
01
2
2
3
3
01
2
2
3
3
01
2
2
3
3
01
2
2
3
3
+++=
+++=
+++=
+++=
CuCuCuCuP
CuCuCuCuz
CuCuCuCuy
CuCuCuCux
zzzz
yyyy
xxxx
[ ] [ ]vectortsCoefficien][
][and1][
where
][][)(formmatrixIn
0123
23
=
==
=
C
CCCCCuuuU
CUuP
TT
T
21
-
8/2/2019 Lecture 4 [Compatibility Mode]
22/26
:giving,1at,and0at,,conditionsboundarytheApplying
.andendpointstwoth thesegment wicurvesplinecubicheConsider t
10,)(
ispointanyatcurvetheector totangent vThe
1231
1
11
1
3
0
1
CCCCP
CPCP
uPPuPP
PP
uiuCuP
o
o
oo
oo
o
i
i
i
+++=
=
=
==
=
=
( ) ( )( )
( ) ( ) ( ) ( )ts.coefficiengeometricascalledareand,,
u-uu2u-u3u2u-13u-2u)(
grearranginandequationparametricin thengSubstituti
2
23
tscoefficienfor theuslysimultaneoequationsfourtheSolving
11
1
2323
1
2323
113
1012
1
1231
PPPP
PPPPuP
PPPPC
PPPPC
PC
PC
oo
oo
oo
o
o
oo
++++++=
++=
=
=
=
=
22
-
8/2/2019 Lecture 4 [Compatibility Mode]
23/26
( ) ( ) ( ) ( )[ ]
functions.blendingcalledareThese
u-u(u)F
u2u-u(u)F3u-2u(u)F
13u-2u(u)F
vectorconditionboundaryort vectorcoefficiengeometric][u-uu2u-u3u2u-13u-2u)(
23
4
23
3
23
2
23
1
11
1
2323
1
2323
=
+=
+=
+=
==
++++++=
PPPPVPPPPuP
oo
oo
matrixHermite][M
10][V],[M[U](u)
P(u)FP(u)FP(u)FP(u)F(u)P
H
H
T
14031201
=
=
+++=
uP
23
-
8/2/2019 Lecture 4 [Compatibility Mode]
24/26
0001
0100
1233
1122
][matrixHermite MH
==
24
]][[Cobtainwe
],][[][)(and][][)(Comparing
VM
VMUuPCUuP
H
HTT
=
==
-
8/2/2019 Lecture 4 [Compatibility Mode]
25/26
[ ]
[ ]
+++++=
=
=
231436666
aswrittenisectortangent vtheSimilarly
0123
0100
11111000
][][
2222
1
1
H
H
PuuPuuPuuPuuuP
M
CMV
25
=
=
0100
2466
3366
0000
][
where
][][][
u
H
uH
T
oo
M
VMU
-
8/2/2019 Lecture 4 [Compatibility Mode]
26/26
Example 1 Find the equation of a Hermite Cubic Spline
that passes through the points (1,2) and (3,4)and whose tangent vectors are two lines
, .
26