Professional Documents
Culture Documents
M 2 1 2 Parametric Geom Model Analytic Curves
M 2 1 2 Parametric Geom Model Analytic Curves
Analytic Curves
ME F318/MF F342:
COMPUTER AIDED DESIGN
PARAMETRIC MODELING OF ANALYTIC
CURVES
GEOMETRIC MODELING OF PARAMETRIC STRAIGHT LINE
This is equivalent to
P1
x x1 u ( x2 x1 ) x x1 x2 x1 MCS X
O
y y1 u ( y 2 y1 ), 0 u 1 or y y1 u y 2 y1 Z
z z1 u ( z 2 z1 ) z z z z
1 2 1
Method 2 : When starting point, tangent vector and length are known :
Y
P P1 uLn̂, 0 u 1, L length L
x x1 n x n
MCS P1
y
1y uL n y O X
z z n Z
1 z
GEOMETRIC MODELING OF PARAMETRIC STRAIGHT LINE
Demo Exercise:
Using the parametric line between P1 =[4,8,2] and P2=[8,6,12] find the point and unit tangent vector at its mid-point.
Solution:
P (u ) P1 ( P2 P1 )u
dP
P' ( P2 P1 )
du
( P2 P1 ) ( P2 P1 )
nˆ
P2 P1 L
L P2 P1
x2 x1 2 y2 y1 2
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 4
Demo Exercise:
(a) Given that the parametric line L1 starts at P1 =[2,1,0] cm extends along n1
=[0.75, 0.6614, 0] and is bounded by P2=[8,5,0] cm. Find its parametric equation
and end point.
(b) Given that the parametric line L2 starts at P1, perpendicular to L1 and is
bounded by P3 =[4,12,0] finds its parametric equation. Find the 3/4 th point on it.
P5
P4
L2
L1
n2
n1
P1
MCS
P5
P4
L2
L1
n2
n1
P1
MCS
L1
P4
n1
P1
L
2
n1
P3
MCS
If a parametric straight line begins at P1, goes along n1 and its length is
bounded by P3, then its parametric equation is:
(A) P(u)=P1+u*(P3-P1)
(B) P(u)=P1+n1
(C) P(u)=P1+{(P3-P1).n1}*u*n1
(D) P(u)=P1+P3
x = xc + R cos(u)
y = yc + R sin(u) 0 ≤ u ≤ 2
z = zc
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 10
u Pn+1=(xn+1, yn+1, zn+1)
Pn=(xn, yn, zn)
P=(x, y, z)
u=0
u=
Pc=(xc, yc, zc) u=2
Pc
u=3/2
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 11
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 simplifying
xn+1 = xc + (xn – xc) cos(u) - (yn – yc) sin(u)
yn+1 = yc + (yn – yc) cos(u) + (xn – xc) sin(u)
zn+1 = zn
Trigonometric terms have to be calculated only
once for a given u.
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 12
Examples:
P(u ) [ x(u ), y (u ), z (u )]T [ xv R cos u , yv R sin u , zv ]T 0 u 2
P' (u ) [dx(u ) / du, dy(u ) / du, dz(u ) / du]T [ R sin u, R cos u , 0]T
At u 0, P' (u ) [ R sin 0, R cos 0, 0]T [0, R, 0]T
slope dy / dx (dy / du) /(dx / du) R / 0 ,
tan sin / cos sin 90 / cos 90
1 / 0 , verified. Yw
o T
At u 90 , P' (u ) [ R sin 90, R cos 90, 0]
Y
[ R, 0, 0]T
slope dy / dx (dy / du) /(dx / du)
0 / R 0,
tan 180 sin180 / cos180
0 / 1 0 verified.
u =90o
At u 45o , P' (u ) [ R sin 45, R cos 45, 0]T
[ R / 2 , R / 2 , 0]T Xw
slope dy / dx (dy / du) /(dx / du)
R / 2 / R / 2 1,
tan 135 sin135 / cos135
sin90 45 / cos90 45
cos 45 /( sin 45)
1 / 2 / 1 / 2 1, verified.
X
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 13
Parametric Equation of a
Circular Arc
x = xc + R cos(u)
y = yc + R sin(u) umin ≤ u ≤ umax
z = zc
Yw
Y
Xw
umin u
umax
X
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 14
Geometric modeling of Parametric
Ellipse
Two cases of ellipses we will consider:
– General Ellipse, 0
– Basic Ellipse, = 0
Y Yw
Y
Yw
WCS
Xw
WCS
B
A
Xw
C
C
X X
MCS Basic Ellipse, = 0
MCS General Ellipse, 0
BITS Pilani, Hyderabad Campus
Parametric Equation of the Basic Ellipse
A
B
With respect to the MCS:
x = xc + A cos()
y = yc + B sin() 0 ≤ ≤ 2 P
z = zc
Bsin()
Or
Y
x = xc + A cos(2u)
y = yc + B sin(2u) 0≤u≤1 MCS X
z = zc Acos()
What is the parametric geometric model of a basic ellipse with A=120 mm, B=40 mm
and its center at C=[150, 80, 0] mm? (a) Estimate the point, tangent vector and
slope from tangent vector on it at u=0.3. (b) At what value(s) of the parameter does
the slope become unbounded?
A cos() sin(α)
P(u)= yc + A cos(2u) sin(α) + B sin(2u) cos(α) ,
Pc=(xc, yc, zc)
zc x B sin() sin(α) Parallel to X
A cos() cos(α)
0≤u≤1
Pc
Y
X
MCS
19 BITS Pilani, Hyderabad Campus
Exercise: Find the computational
model for the basic ellipse
u
x = xc + A cos(u) Pn+1=(xn+1, yn+1, zn+1)
Pn=(xn, yn, zn)
y = yc + B sin(u) 0 ≤ u ≤ 2 P=(x, y, z)
z = zc
u=0
u=
Pc=(xc, yc, zc) u=2
Pc
xn+1 = xc + (xn – xc) cos(u) – (A/B)(yn – yc) sin(u) u=3/2
20
Contd:
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 21
Exercise: Find the tangent vector to the basic ellipse
and general ellipse at any given point on its
circumference.
• Differentiating the parametric equation for ellipse
with major axis parallel to x-axis (that is the
basic ellipse) with respect to u, we get
P’=[-Asinu, B cosu, 0]
• Differentiating with respect to “u” the parametric
equation for general ellipse with major axis
inclined at α to x-axis, we get
P’=[-Asinu cos α – B cos(u) sin (α),
– A sin(u) sin(α)+B cos(u) cos(α), 0]
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 22
Exercise:
Find the value of the parameter at which a general ellipse has infinite
slope.
Solution:
P(u) =[xc+Acos(u)cos(α)-Bsin(u)sin(α), yc+Acos(u)sin(α)+Bsin(u)cos(α), zc],
0≤u≤2
Differentiating with respect to “u” the parametric equation for general
ellipse:
P’(u)=[-Asin(u)cos(α)-Bcos(u)sin(α), -A sin(u)sin(α)+Bcos(u)cos(α), 0]
Slope = dy/dx=(dy/du)/(dx/du) =
(– A sin(u) sin(α)+B cos(u) cos(α))/(-Asinu cos α – B cos(u) sin (α)) =
Or 1/slope=0 =>-Asin(u)cos(α)-Bcos(u)sin(α)=0 =>u=arctan(-(B/A)*tan(α))
BITS Pilani, Hyderabad Campus
Exercise: Develop the computational model for general ellipse.
x = xc + A cos(u) cos(α) – B sin(u) sin(α)
y = yc + A cos(u) sin(α) + B sin(u) cos(α) ≤ u ≤ 2
z = zc
Pn=(xn, yn, zn) P=(x, y, z)
Pn+1=(xn+1, yn+1, zn+1) B sin(u) cos(α)
A cos(u) sin(α)
x B sin(u) sin(α)
A cos(u) cos(α)
MCS
Z X 24
(contd)
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 25
Definition of Parabola
• Curve generated by a point
that moves such that its
distance from a fixed point
(the focus PF) is always equal
to its distance to a fixed line
(the directrix).
• Once the parabola is
generated Directrix has no
importance.
A
• The vertex (PV) is the A
intersection point of the
parabola with its axis of
symmetry. It is located P-F = d
F-V=A=focal distance
midway between the directrix = distance from V to
and the focus. directrix
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 26
The parametric equation of a basic parabola (α =0) and slope
YW
x xv Au 2 umin u umax
Y
y y v 2 Au u =0 at the vertex. V XW
z zv
X
Where V=[xv,yv,zv]T is the vertex point. MCS
Therefore the position vector of any point on the parabola is
P (u ) xv Au , yv 2 Au , z v
2
T
2 Au , 2 A, 0
dP (u ) T
The tangent vector is given by
du
At u=0, that is at the vertex, the slope is ∞.
However, even though x’(u) is also zero, tangent vector is
bounded.
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 27
The parametric equation of the general
YW
(inclined) parabolawith inclination α
and its slope XW
Y
x xv Au 2 cos 2 Au sin
y yv Au 2 sin 2 Au cos
z zv
X
or MCS
P (u ) [ xv Au 2 cos 2 Au sin ,
yv Au sin 2 Au cos , v
z
2 ] T
du
At u=0, the slope is not unbounded unlike basic parabola,
unless α is zero. The slope will be unbounded at u=tan α,
how do you know?.
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 28
The tangent to a parabola at any given
point on it.
• Differentiating with respect to u the
parametric equation for parabola with its axis
of symmetry parallel to x-axis, we get
P’=[2Au, 2A, 0]
• Differentiating with respect to “u” the
parametric equation for general parabola
with axis of symmetry inclined at α to x-axis,
we get
P’=[2Aucosα – 2A sin (α), – 2Au sin(α)+2A
cos(α), 0]
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 29
Exercise:
du
For infinite slope, dy/dx = (dy/du)/(dx/du) = ;
1/slope = (dx/du)/(dy/du) = 0 dx/du =0
2 Aucos 2 A sin 0
u tan Ans.
BITS Pilani, Hyderabad Campus
Exercise:
dP(u )
du
2 x20x0.5 x cos30 2 x20x sin 30, 2 x20x0.5 x sin 30 2 x20x cos30, 0 T
17.32 20, 10 34.64, 0 2.68, 44.64, 0 x, y, z
T T T
Solution:
du
slope=(dy/dx)=(dy/du)/(dx/du)= 40/20=2; =tan-1(2)=63.43°
du
slope=(dy/dx)=(dy/du)/(dx/du)= 40/80=0.5; =tan-1(0.5)=26.56°
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 34
(ii) The transformation of tangent vector from WCS to MCS is
The results are proved to be the same as those by the first method.
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 36
Exercise:
(a) For a parametric general parabola with vertex point at [1, 1] and focal
distance of 40 mm with its axis of symmetry inclined at 60 o to the MCS X-
axis, at what value of the parameter that the slope becomes unbounded? (b)
At half this value of the parameter, find the point and tangent vector of the
curve using its parametric equation. (c) Prove also that this tangent vector
can be found alternatively by using the parametric equation of the basic
parabola and the homogeneous transformation matrix.
Non-parametric form 2
2 1 Axis Asymptote
A B YW
Parametric Equation: Y A