M2-1-1-Basics of Parametric Geom Model Analytic Curves
M2-1-1-Basics of Parametric Geom Model Analytic Curves
Parametric
Synthetic curve
Parametric Parametric
ellipse parabola
Parametric straightline
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 4
Geometric Modeling
• Wire-frame modeling
• Surface modeling
• Solid modeling
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 5
Wireframe Modeling
• It is the simplest but most verbose
geometric model of an object
• The word “wire” is to represent
that a bent wire can be arranged
to simulate the wireframe model
of an object
• It consists entirely of points, lines,
arcs, circles, other conics and
other polynomial and synthetic
curves.
• It is the most commonly used
technique
• Almost all commercial packages
of CAD are wireframe-based.
• It is also referred sometimes as
stick figure or edge configuration.
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 6
Wireframe Modeling (contd.)
• Developed in 1960s, initially it was limited to 2-D,
applied to drafting and simple NC.
• Current day wireframe modelers support various
automatic functionalities:
– Automatic generation of orthographic views from wireframe
model of part
– All three modes of data input: cartesian, cylindrical and
spherical.
– Explicit as well as Implicit input in each mode
– Explicit input through absolute or incremental coordinates
– Implicit input through digitizing tablets
– Support to the geometric modifiers, built by the system
itself and help locate mid-points and end-points of
geometric entities created
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 7
Wireframe modeling: Disadvantages
• Data input is laborious
• Ambiguous
• Lengthy and verbose
Model
Which one?
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 9
Wireframe Modeling: Advantages
• Simplicity of construction: does not required as
much computer time and memory as required by
surface and solid modeling techniques
• It is a natural extension of traditional methods of
drafting: does not require extensive training to
existing draftsmen
• Terminology is much simpler and fewer than
SfM and SM
• The CPU time required to retrieve, edit or update
a wireframe model is usually small compared to
SfM and SM
• Wireframe models are basis for SfM and SM
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 10
Wireframe Entities are Different Curves
• Analytic Curves
– Points
– Lines
– Arcs
– Circles
– Fillets
– Chamfers
– Conics: Ellipses, Parabolas, and Hyperbolas
• Synthetic Curves
– Cubic Splines (Hermite cubic spline for example)
– Bezier curves
– B-Spline curve
The analytic and synthetic curve segments are suitably
blended to obtain a longer curve of creative shape.
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 11
PRACTICAL EXERCISE
• Write program in MATLAB to generate the
various elements of wireframe modeling:
– Points
– Lines
– Poly-line
– Spline
– Circles
– Ellipse
– Arcs
– Parabola
– Hyperbola
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 12
Alternative Representations of Curves
• Explicit non-parametric representation
• Parametric representation
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 13
• Explicit non-parametric representation of a
general 3-D curve is done by:
P=[x f(x) g(x) ]T
P = Position vector of any point P on the curve
• Implicit Non-parametric representation of a
curve is the intersection of two surfaces defined
by
F(x, y, z) = 0
G(x, y, z) = 0
P(x, y, z)
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 14
Disadvantages of Non-parametric Representations
• Multi-valued nature
• Implicit representation is laborious as it requires that two
surface equations be solved for “y” and “z” for a given value
of “x”
• Infinite slope situations can not be dealt with in computer
program
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 15
Parametric form of a curve
• It is a one-to-one mapping from the
parametric space (Euclidean space E1 in u
values) to the Cartesian space (E3 in x, y,
X
z values)
u=0
u
u
u=umin u=umax
Y
Y
u
umax
Z
umin n
P(u) P’(u)
umax u
umin u
X
Z Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus
16
Parametric Representation of curves: Advantages
X
Z
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 18
The Tangent Vector of a Parametric Curve
• To enable evaluation of slope of a parametric curve
at any arbitrary point on it, the tangent curve must
be evaluated.
• The tangent vector is a vector Y P’(u) in Cartesian
space such that u max
dP (u ) umin n
P(u ) P(u) P’(u)
du X
• The components of tangent vector in parametric space
P’(u) = [ x’ y’ z’]T = [ x’(u) y’(u) z’(u)]T, umin≤u≤umax
The unit tangent vector is given by:
P ' (u )
nˆ nxiˆ n y jˆ nz kˆ nx2 n y2 nz2 1
P ' (u )
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 19
Exercise:
– Analytic curves
• May be very useful only as planar curves
• Not useful when the curve has to be a space curve
– Synthetic curves
• Useful to represent space curves
• Useful for freeform modeling
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 21
Analytic curves or Planar curves
• Most useful of analytic curves are the
conic section curves (lines, circles,
ellipses, parabolas, hyperbolas or
other general conics)
• They provide the compact form and
more convenient for computations of
secondary properties such area,
volume
• Not attractive for interactive
computation
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 22
Synthetic curves
• Described by a set of data points
(called as control points) and
parametric polynomials that
interpolate or approximate those
points
• They provide greater flexibility an
control of a curve by changing the
positions of control points
• Global as well as local control can
be obtained
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 23
PARAMETRIC REPRESENTATION OF
ANALYTIC CURVES
Dr. Regalla
Dr. Srinivasa
Srinivasa
Prakash
Prakash,
Regalla,
Professor,
Professor,
Mechanical
Mechanical
Engineering,
Engineering,
BirlaBITS-Pilani
Institute of Technology
Hyderabad Campus
& Science, Pilani 24
ANALYTIC CURVES:
TOPICS TO BE COVERED
• Review of vector algebra
• Lines
• Circles
• Ellipses
• Parabolas
• Hyperbolas
• Conics (General)
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 25
Review of vector algebra
Let:
A, B, and C be independent vectors
i, j, and k be unit vectors in X, Y, Z directors
K be a constant.
1. Magnitude of a vector is
A A A A 2
x
2
y
2
z
Where Ax, Ay and Az are the cartesian components of
the vector A.
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 26
2. The unit vector in the direction of A is
A
nˆ A n Ax ˆi n Ay ˆj n Az kˆ
A
The components of nˆ A are also the direction cosines of the vector A.
3. If two vectors A and B are equal then
Ax=Bx Ay=By Az=Bz
4. The scalar (or dot or inner) product of two vectors
A and B is a scalar value given by Use the
convenient
A•B=B•A=AxBx+AyBy+AzBz=|A||B|cosθ form as per
Hence the angle is θ=cos-1[(A•B)/(|A||B|)] given data
The scalar product can give the component of a
vector in the direction another unit vector:
A•nB=|A|cosθ
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 27
Other properties of scalar product are
A•A=|A|2
A•B=B•A
A•(B+C)=A•B+A•C
(KA)•B=A.(KB)=K(A•B)
i•i=j•j=k•k=1
i•j=j•k=k•i=0
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 28
5. The vector (cross) product of two vectors
A and B is a vector that is perpendicular to
the plane formed by A and B and is given
by ˆi ˆj kˆ
A B Ax Ay Az
Bx By Bz
A B C A B A C
(kA) B A kB k A B
ˆi ˆi ˆj ˆj kˆ kˆ 0
ˆi ˆj kˆ
ˆj kˆ ˆi
kˆ ˆi ˆj
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 30
6. Two vectors A and B are parallel if and only if
n̂ A n̂ B 1 or n̂ A n̂ B 0 or A B 0
7. Two vectors A and B are perpendicular if and only if
n̂ A n̂ B 0 or n̂ A n̂ B 1 or A B 0
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 31
QUADRIC POLYNOMIAL FUNCTIONS
Represents a conic section curve
x2 + y2 – 1 = 0
Ellipse a 2 b2
Parabola y 2– 4 a x= 0
x2 – y2 – 1 = 0
Hyperbola a2 b2
Ellipse
Hyperbola
Parabola Circle
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 32
Conic Sections
(courtesy: http://www.math2.org/math/algebra/conics.htm)
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 33
End of the topic
• Any questions?
Dr. Srinivasa Prakash Regalla, Professor, Mechanical Engineering, BITS-Pilani Hyderabad Campus 34