0% found this document useful (0 votes)
62 views38 pages

Parametric Representation of Ellipses

This document discusses the parametric modeling of analytic curves. It begins by presenting two methods for the parametric representation of lines, including an example of finding the midpoint and unit tangent vector of a line. It then covers the parametric representation of circles, including computing discrete points for display. Finally, it discusses the parametric representation of ellipses and circular arcs. The key concepts are the use of parameters to define curves analytically and compute geometric properties along the curves.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views38 pages

Parametric Representation of Ellipses

This document discusses the parametric modeling of analytic curves. It begins by presenting two methods for the parametric representation of lines, including an example of finding the midpoint and unit tangent vector of a line. It then covers the parametric representation of circles, including computing discrete points for display. Finally, it discusses the parametric representation of ellipses and circular arcs. The key concepts are the use of parameters to define curves analytically and compute geometric properties along the curves.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

M2-1-2: Geometric Modeling of

Analytic Curves

Dr. Srinivasa Prakash Regalla, PhD


Professor, Department of Mechanical Engineering
BITS-Pilani, Hyderabad Campus

ME/MF F342:
COMPUTER AIDED DESIGN
PARAMETRIC MODELING OF ANALYTIC
CURVES
PARAMETRIC REPRESENTATION OF LINES

Method 1 :
P  P1  u (P2  P1 ) 0  u 1
This is equivalent to
x  x1  u ( x2  x1 ) 

y  y1  u ( y2  y1 ) 0  u  1
z  z1  u ( z 2  z1 ) 
Method 2 :
P  P1  Ln̂   L  
L itself will act like the parameter and is given by
L  P  P1
PARAMETRIC REPRESENTATION OF LINES
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.

P  P1  ( P2  P1 )u
P '  ( P2  P1 )
( P2  P1 )
nˆ 
L
L  P2  P1  x2  x1    y2  y1 
2 2

Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 5
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.

(a) L1  (P2  P1 )  n̂1 P3


P2

P  P1  L1un̂1 0  u  1 P5 P4

L2
(b) n2 x  n1 y L1
n2
n2 y  n1x n1

L2  (P3  P1 )  n̂ 2 P1
MCS
P  P1  L2un̂ 2 0  u 1

Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 5
P2
P3

P5 P4

L2
L1
n2
n1
P1
MCS

Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 6
Exercise
(a) The line L1 starts at P1 =[1,6,0] has
length of L1 =7.2 cm and extends along n1
=[0.75, 0.6614, 0]. Find its end point P2.
(b) If another line L2, which is parallel to L1,
starts at P3 =[2,1,0] and is bounded by P5
=[8,12,0] find the parametric equation of L2
and its end point P4.
P2 P5
(a) P  P1  L1unˆ 1 0  u  1
L1
 P2  P1  L1nˆ 1
P4
n1
(b) nˆ 2  nˆ 1,  the lines are parallel P1
L2
L2  P5  P3   nˆ 2
P  P3  L2unˆ 2 0  u 1 n1
P4  P3  L2nˆ 2 MCS P3

Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 7
Exercise:

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

BITS Pilani, Hyderabad Campus


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)
for parametric representation of a circle.

Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 9
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 10
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 11
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
 sin90  45 / cos90  45
 cos 45 /( sin 45) 
  
 1 / 2 /  1 / 2  1, verified.
X
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 12
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 13
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(2u)
y = yc + B sin(2u) 0≤u≤1 MCS X
z = zc Acos()

P(u) = [xc + Acos(2u), yc + Bsin(2u), zc], 0 ≤ u ≤ 1


Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus BITS Pilani, Hyderabad Campus
Exercise:

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?

BITS Pilani, Hyderabad Campus


Solution:

P(u) = [xc + Acos(2u), yc + Bsin(2u), zc], 0 ≤ u ≤ 1

P(0.3) = [150 + 120*cos(2**0.3), 80 + 40*sin(2**0.3), 0], 0 ≤ u ≤ 1

BITS Pilani, Hyderabad Campus


Parametric Equation of General Ellipse
XW
Parallel to Y
With respect to the MCS:
P(u)=[x, y, z]T P=(x, y, z)
YW
B sin() cos(α)

xc + A cos(2u) cos(α) – B sin(2u) sin(α) y

A cos() sin(α)
P(u)= yc + A cos(2u) sin(α) + B sin(2u) cos(α) ,
Pc=(xc, yc, zc)
zc x B sin() sin(α) Parallel to X
A cos() cos(α)

0≤u≤1
Pc
Y

X
MCS
18 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

yn+1 = yc + (yn – yc) cos(u) + (A/B)(xn – xc) sin(u)


zn+1 = zn

19
Contd:

Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 20
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 21
Exercise:
Find the value of the parameter at which a general ellipse has infinite slope.
Solution:
P(u) = [xc+Acos(u)cos(α)-B sin(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 23
(contd)

xn+1 = xc + A cos(un+u) cos(α) - B


sin(un+u) sin(α)
yn+1 = yc + A cos(un+u) sin(α) + B
sin(un+u) cos(α)
zn+1 = zn
Here
un=(n-1) u, with n=1 lying at the end of
major axis.
• cos(un+u) and sin(un+u) are evaluated
using the double-angle formula

Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 24
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 25
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 26
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

 2 Au cos  2 A sin  , 2 Au sin   2 A cos , 0 


dP (u ) 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 27
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 28
Exercise:

Find the value of the parameter “u” at which the slope on a


general parabola becomes infinite.
Solution:
P (u )  [ xv  Au 2 cos  2 Au sin ,
y  Au 2 sin  2 Au cos , z v ]
T
v

 2 Au cos  2 A sin  , 2 Au sin   2 A cos , 0 


dP (u ) T

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:

Find the point and tangent vector and slope of a


parametric general (inclined) parabola with α=30° for
two different values of u, 0.5 and 2.0, when the focal
distance is 20 mm, by following these two methods and
show that the results are same:

1) By using the parametric equations of the general


parabola to find directly about MCS.

2) By using the parametric equations of the basic


parabola in WCS, and then applying the
homogeneous transformation matrix to convert
from WCS to MCS.

BITS Pilani, Hyderabad Campus


Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 31
Solution: For a general parabola in Xw –
YW
Yw plane at u=0.5 and u=2 when the focal
distance is 20 mm: XW
Solution: (i) α=30°, u=0.5, A=20 mm

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

slope=(dy/dx)=(dy/du)/(dx/du)= 44.64/(-2.68) = -16.66;  = tan-1(-16.66) = 93.44°

α=30°, u=2.0, A=20 mm


dP(u )

du
2 x20x2.0 x cos30  2 x20x sin 30, 2 x20x2.0 x sin 30  2 x20x cos30, 0 T
 49.28, 74.64, 0   x, y, z 
T T

slope=(dy/dx)=(dy/du)/(dx/du)= 1.512; = 56.57°


Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 32
For a basic parabola in Xw – Yw plane at u=0.5 and u=2
when the focal distance is 20 mm when α=0°.

Solution:

α=0°, u=0.5, A=20 mm

 2 x 20x0.5, 2 x 20, 0   20, 40, 0   x , y , z  


dP(u ) T T T

du
slope=(dy/dx)=(dy/du)/(dx/du)= 40/20=2; =tan-1(2)=63.43°

α=0°, u=2.0, A=20 mm

 2 x 20x 2.0, 2 x 20, 0   80, 40, 0   x , y , z  


dP(u ) T T T

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 33
(ii) The transformation of tangent vector from WCS to MCS is

cos   sin  0 xv  Note that no translational


 sin  cos  0 y v 
transformation is required for
tangent vector!
T 
 0 0 1 zv  for curve itself and
 
 0 0 0 1
cos  sin  0 0 for tangent vector. We
 sin  cos 0 0 take the result for α=0, u =
T  0.5 and 2.0 and apply the
 0 0 1 0
  transformation matrix:
 0 0 0 1
For u=0.5:
 x  cos 300  sin 300 0 0 20  2.68 which is
 y      
dP(u )    sin 30
0
cos 300 0 0 40  44.64  same as
    
du u 0.5  z   0 0 
1 0  0   0  the above
  
 1   0 0 0 1  1   1  method.

Can you prove the same for u=2.0?
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 34
For u=0.2:

 x  cos 30 0  sin 30 0 0 0 80  49.28


 y      
dP(u )    sin 30 0 cos 30 0 0 0   
40 74.64 
      
du u  2.0  z    0 0 1 0  0   0 
 
 1   0 1  1   1 
 0 0

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 35
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.

BITS Pilani, Hyderabad Campus


Parametric Equation of a Hyperbola

It is the curve generated by a point moving such


that at any position the difference of its distances
from the fixed points (called foci) F and F’ is a
constant. x2 y2 Conjugate

Non-parametric form 2
 2 1 Axis Asymptote

A B YW
Parametric Equation: Y A

P(u )  [( xv  A cosh u ), ( yv  B sinh u ), z v ]T , B Transverse


Origin axis
u min  u  u max F’ F
PV XW

P ' (u )  [ A sinh u , B cosh u ,0]T , PV

u min  u  u max X Asymptote

BITS Pilani, Hyderabad Campus


End of the topic
• Any questions?

Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 38

You might also like