Mathematical Representation of Curves - PowerPoint PPT Presentation

1 / 94
About This Presentation
Title:

Mathematical Representation of Curves

Description:

Parabola ... The vertex (PV) is the intersection point of the parabola with its axis of symmetry. ... Find the tangent to a parabola at any given point on it. ... – PowerPoint PPT presentation

Number of Views:788
Avg rating:3.0/5.0
Slides: 95
Provided by: debu8
Category:

less

Transcript and Presenter's Notes

Title: Mathematical Representation of Curves


1
Mathematical Representation of Curves
  • ME C382 COMPUTER AIDED DESIGN

2
Mathematical Modeling of Physical Parts
  • Mathematical model of physical part is a symbolic
    representation of geometry of the part
  • Geometric modeling is a superset of mathematical
    modeling and also includes the activities of
  • Conversion of mathematical model into data
    suitable for storing in a computer memory
  • Organization of data for storage and retrieval

3
Geometric Modeling
  • Wire-frame modeling
  • Surface modeling
  • Solid modeling

4
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, conics and curves.
  • It is the most commonly used technique
  • Almost all commerical packages CAD are
    wireframe-based.
  • It is also referred sometimes as stick figure or
    edge configuration.

5
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

6
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
  • Wireframe models are basis for SfM and SM
  • The CPU time required to retrieve, edit or update
    a wireframe model is usually small compared to
    SfM and SM

7
Wireframe modeling Disadvantages
  • Data input is laborious
  • Wireframe models are ambiguous
  • Lengthy and verbose
  • WM requires both Topological and Geometrical
    data whereas SM required on Geometrical data

8
WIREFRAME MODEL - Ambiguity
Modeling with all edges of an object. On the
left is a wireframe drawing of a wireframe
model.
WfM needs both point and edge data (geometrical
data) and also the description of how they are
connected to each other (topological data
connectivity). SM requires only geometrical data
(P, L, W and H for a cube) because topological
information is in-built.
9
Wireframe Entities
  • Analytic Entities
  • Points
  • Lines
  • Arcs
  • Circles
  • Fillets
  • Chamfers
  • Conics Ellipses, Parabolas, and Hyperbolas
  • Synthetic Entities
  • Cubic Splines (Hermite cubic spline for example)
  • Bezier curves
  • B-Spline curve
  • Various modifiers to suitable blend the above,
    when required

10
AMBIGUITY OF WIREFRAME MODEL
Model
Which one?
11
REVISION POINT - 1
  • Revise on AutoCAD the various methods of explicit
    drawing of the following
  • Points
  • Lines
  • Poly-line
  • Spline
  • Circles
  • Ellipse
  • Arcs
  • Parabola
  • Hyperbola

12
  • Explicit non-parametric representation of a
    general 3-D curve
  • P x y z T 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)
P
13
Disadvantages of Non-parametric Representations
  • Explicit non-parametric representation can not be
    used for closed curves (like circles) and
    multi-valued curves (like parabolas). Because it
    is a one-to-one relationship.
  • The above problem is overcome by implicit
    representation but the latter is laborious.
  • Implicit representation 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
  • Shapes of most objects are coordinate system
    independent
  • Displaying curve as a series of points or line
    segments because computationally extensive and
    hence expensive.

14
Parametric Representation Advantages
  • It overcomes all difficulties of the
    non-parametric representations
  • It allows multi-valued and closed functions to be
    easily defined
  • It replaces the use of slopes with that of
    tangent vectors
  • The equations are polynomials and thus
    computationally more suitable than equations
    involving roots

15
Parametric Form of a Curve
  • In parametric form, each point on a curve is
    expressed as a function of a parameter u.
  • The parameter acts as a local coordinate for
    points on the curve
  • The parametric equation for a 3-D curve in space
    is
  • P(u) x y zT x(u) y(u) z(u)T,
    uminuumax
  • Coordinates of a point on the curve are the
    components of its position vector.

16
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, z values)

X
u0
u
u
uumin
uumax
Y
Y
u
umax
Z
umin
n
P(u)
P(u)
u
umax
umin
u
X
Z
17
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 P(u) in Cartesian
    space such that
  • The components of tangent vector in parametric
    space
  • P(u) x y zT x(u) y(u) z(u)T,
    uminuumax

The unit tangent vector is given by
18
  • Parametric representation of curves can be in two
    categories
  • Analytic curves
  • May be very useful as planar curves
  • Not useful when the curves has to be a space
    curve
  • Synthetic curves
  • Useful to represent space curves
  • Useful for freeform modeling

19
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

20
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

21
PARAMETRIC REPRESENTATION OF ANALYTIC CURVES
22
ANALYTIC CURVES TOPICS TO BE COVERED
  • Review of vector algebra
  • Lines
  • Circles
  • Ellipses
  • Parabolas
  • Hyperbolas
  • Conics (General)

23
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.
  • Magnitude of a vector is
  • Where Ax, Ay and Az are the cartesian components
    of the vector A.

24
  • 2. The unit vector in the direction of A is

3. If two vectors A and B are equal
then AxBx AyBy AzBz
4. The scalar (or dot or inner) product of two
vectors A and B is a scalar value given
by ABBAAxBxAyByAzBzABcos? Hence the
angle is ?cos-1(AB)/(AB) The scalar
product can give the component of a vector in the
direction another unit vector AnBAcos?
25
  • Other properties of scalar product are
  • AAA2
  • ABBA
  • A(BC)ABAC
  • (KA)BA.(KB)K(AB)
  • iijjkk1
  • ijjkki0

26
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
Where l is a unit vector perpendicular to the
plane of A and B having sense as per right hand
screw when A is rotated towards B.
27
(No Transcript)
28
(No Transcript)
29
QUADRIC POLYNOMIAL FUNCTIONS
Ellipse
Hyperbola
Parabola
Circle
30
Conic Sections
(courtesy http//www.math2.org/math/algebra/conic
s.htm)
31
PARAMETRIC REPRESENTATION OF LINES
32
Example
  • Using the parametric line between P1 and P2, find
    the unit vector an unit tangent vector along the
    line and length of line.

33
Example
  • Given two lines, first drawn between P1 and P2
    and second drawn between P3 and P4, find the
    parametric equations for them and determine the
    condition for checking whether they are parallel
    or perpendicular. If neither, find the
    intersection point if exists.
  • Examine your results for the case of P13, 4,
    7, P25,6,1, P31, 5, -2 and P42, 9,0.

34
  • Solution
  • If they are parallel, the cross-product of the
    tangent vectors should be zero.
  • If they are perpendicular, the dot product of
    their tangent vectors should be zero.
  • The intersection point can be found by equating
    the parametric equations of the two lines. For 3D
    space curve, this gives three equations in two
    unknowns. Use any two equations to determine the
    values of the parameters u and v at the point of
    intersection.

35
Example - 1
P2
P3
n2
n1
P1
WCS
MCS
36
Example - 2
P4
n1
P1
n1
P3
WCS
MCS
37
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.

38
?u
Pn1(xn1, yn1, zn1)
Pn(xn, yn, zn)
P(x, y, z)
u0
u?
u2?
Pc(xc, yc, zc)
Pc
u3?/2
39
Computation Of Parametric Circle For Computer
Display
  • x xc R cos(u)
  • y yc R sin(u) 0 u 2?
  • z zc
  • xn1 xc R cos(u?u)
  • yn1 yc R cos(u?u)
  • zn1 zn
  • Expanding the trigonometric terms and simplifying
  • xn1 xc (xn xc) cos(?u) - (yn yc)
    sin(?u)
  • yn1 yc (yn yc) cos(?u) (xn xc)
    sin(?u)
  • zn1 zn
  • Trigonometric terms have to be calculated only
    once for a given ?u.

40
Examples
41
Yw
Y
u
?90o
Xw
X
42
Circular Arc
  • x xc R cos(u)
  • y yc R sin(u) us u ue
  • z zc

43
Ellipse
44
Ellipse
  • x xc A cos(u)
  • y yc B sin(u) 0 u 2?
  • z zc

45
Computation Of Parametric Ellipse For Computer
Display
  • xn1 xc (xn xc) cos(?u)
  • (A/B)(yn yc) sin(?u)
  • yn1 yc (yn yc) cos(?u)
  • (A/B)(xn xc) sin(?u)
  • zn1 zn

General Ellipse
x xc A cos(u) cos(a) B sin(u) sin(a) y yc
B cos(u) sin(a) B sin(u) cos(a) z zc 0 u
2?
46
General Ellipse
Pn1(xn1, yn1, zn1)
Pn(xn, yn, zn)
P(x, y, z)
47
Computation Of Parametric General Ellipse For
Computer Display
  • xn1 xc A cos(un?u) cos(a) - B sin(un?u)
    sin(a)
  • yn1 yc A cos(un?u) sin(a) B sin(un?u)
    cos(a)
  • zn1 zn
  • Here
  • un(n-1) ?u, with n1 lying at the end of major
    axis.
  • cos(un?u) and sin(un?u) are evaluated using the
    double-angle formula

48
Find the tangent vector to an ellipse at any
given point on its circumference.
  • Differentiating the parametric equation for
    ellipse with major axis parallel to x-axis 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 a to x-axis, we get
  • P-Asinu cos a B cos(u) sin (a),
  • A sin(u) sin(a)B cos(u) cos(a), 0

49
Parabola
  • It is a 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).
  • The vertex (PV) is the intersection point of the
    parabola with its axis of symmetry. It is located
    midway between the directrix and the focus.

50
The parametric equation of a basic parabola (a
0) is
-8 ? u ? 8
Therefore the position vector of any point on the
parabola is
The tangent vector is given by
At u0, that is at the vertex, the slope is 8.
51
The parametric equation of the general (inclined)
parabola with inclination a is given by
or

T
At u0, the slope is not unbounded unlike basic
parabola, unless a is zero. The slope will be
unbounded at utan a.
52
Find 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
  • P2Au, 2A, 0
  • Differentiating with respect to u the
    parametric equation for general parabola with
    axis of symmetry inclined at a to x-axis, we get
  • P2Aucosa 2A sin (a), 2Au sin(a)2A cos(a),
    0

53
  • Find the tangent vector and slope of a parametric
    parabola in Xw Yw plane at u0.5 and u2 when
    the focal distance is 20 mm when a0.

Solution a0, u0.5, A20 mm
slope(dy/dx)(dy/du)/(dx/du) 40/202
?tan-1(2)63.43
a0, u2.0, A20 mm
slope(dy/dx)(dy/du)/(dx/du) 40/800.5
?tan-1(0.5)26.56
54
  • Find the tangent vector and slope of a parametric
    general (inclined) parabola with a30 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.

55
General Parabola
YW
XW
Pn1(xn1, yn1, zn1)
Pn(xn, yn, zn)
a
Pv(xv, yv, zv)
Pc
56
  • Solution
  • (i) a30, u0.5, A20 mm

slope(dy/dx)(dy/du)/(dx/du) 44.64/(-2.68)
-16.66 ? tan-1(-16.66) -86.56
a30, u2.0, A20 mm
slope(dy/dx)(dy/du)/(dx/du) 1.512 ? 56.57
57
  • (ii) The transformation from WCS to MCS is

for curve itself and
for tangent vector. We take the result for a0,
u 0.5 and 2.0 and apply the transformation
matrix
which is same as the above method.
58
The results are proved to be the same as those by
the first method.
Go through also the example 5.5 and 5.16.
59
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 and equal to the transverse
    axis of the hyperbola.

Non-parametric form
Parametric form Method - 1
60
Asymptote
YW
Conjugate Axis
Y
A
B
Transverse axis
Origin
F
F
PV
XW
PV
Asymptote
X
61
Parametric equation of Hyperbola Method 2
62
The General Equation for a Conic SectionAx2
Bxy Cy2 Dx Ey F 0
The type of section can be found from the sign
of B2 - 4AC
63
(No Transcript)
64
PARAMETRIC REPRESENTATION OF SYNTHETIC CURVES
65
What are synthetic curves?
  • Synthetic curves represent a curve fitting
    problem to construct a smooth curve that passes
    through given data points. Polynomials are the
    typical forms.
  • Synthetic curves take up where the analytic
    curves leave the latter are not that efficient
    at geometric design of mechanical parts
  • Some examples of complex geometric design are
  • Car bodies
  • Ship hulls
  • Airplane fuselage and wings
  • Propeller blades
  • Shoe insoles
  • Aesthetically designed bottles

66
Need for synthetic curves?
  • Need for synethetic curves arises in two
    occassions
  • When a curve is represented by a collection of
    measured data points, and
  • When an existing curve must change to meet new
    design requirements the designer needs a curve
    representation that is directly related to the
    data points and is flexible enough to bend, twist
    or change the shape by changing one or more data
    points.

67
The approach of segmentation continuity
requirements
  • Most often, a complex is modeled by several curve
    segments pieced together end to end.
  • This is the approach of segmentation because
    each time we analyzing a curve segment rather
    than the entire curve
  • Continuity at the joints of curve segments
    decides the degree smoothness of the curve
  • Various continuity requirements Co, C1, C2
    can be specified as indication of degree
    smoothness

68
Different continuity requirements
  • Zero-order continuity (Co) yields a position
    continuous curve
  • First (C1) order continuity implies slope
    continuity
  • Second (C2) order continuity implies curvature
    continuity
  • A C1 curve is minimum acceptable curve for
    engineering design

69
  • A cubic polynomial is the minimum-order
    polynomial that can guarantee the generation of
    all three Co, C1 and C2 continuities.
  • The cubic order polynomial is the lowest degree
    polynomial allowing inflection within a curve
    segment
  • A cubic polynomial is the lowest degree curve
    that allows representation of nonplanar (twisted)
    3-D curves in space.
  • Higher order polynomials (gt3) are not used in CAD
    because of the following disadvantages
  • They tend to oscillate about the control points
  • They are computationally expensive and
    inconvenient
  • They are uneconomical of storing curve and
    surface representations in the computer.

70
Control of shape of curve
  • For efficient design, shape of the curve should
    be controllable most effectively in the easiest
    possible way
  • Type of input data plays a crucial role
  • Control points and slope information are more
    easy to use than curvature information
  • Two types of control exist
  • Local control
  • Global control
  • Local control is more desirable

71
Local Control and Global Control
  • Global control is said to be present if change in
    one control point or tangent vector results in
    change of overall shape of the curve segment
  • Local control is said to be present if change in
    one controlpoint or tangent vector results in
    change of shape of curve local to that point

72
Most commonly used Synthetic Curves
  • Hermite Cubic Spline
  • It passes through the control points and
    therefore it is an interpolant
  • It has only upto C1 continuity
  • Bezier Curve
  • It does not pass through the control points but
    only approximates 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

73
Hermite Cubic Spline Curve Segment
  • They are used to interpolate the given data but
    not to design free-form curves.
  • (Cubic) Splines derive their name from French
    curves or splines
  • Hermite cubic spline is one type of general
    parametric cubic spline with degree equal to 3
    and being determined by two data points and
    tangent vectors at the data points.
  • Hermite Cubic Spline can be a 3-D planar curve or
    3-D twisted curve.

74
3-D Planar Hermite Cubic Spline
  • The XWYW plane of the current WCS is used to
    define the data points and plane of curve
  • Then WCS data is transferred to MCS using T
  • The HCS curve segment is always cubic (fixed
    degree)
  • It connects two data (end) points and utilizes a
    cubic equation.
  • Four conditions are required to determine the
    coefficients of the equation two end points and
    the two tangent vectors at these two points

75
Parametric Equation of Hermite Cubic Spline
Segment
76
(No Transcript)
77
(No Transcript)
78
(No Transcript)
79
(No Transcript)
80
(No Transcript)
81
  • Prove that the basis functions of the Hermite
    cubic spline curve are symmetric. What is the
    consequence of this symmetry?

Solution F1(u1)2 u13-3 u121 F2(u1)-2 u133
u12 F3(u1) u13-2 u12 u1 F4(u1) u13- u12
82
Substitute u21- u1 or u11- u2 F1(u1)2
(1-u2)3-3 (1-u2)21 F2(u2) F2(u1)-2 (1-u2)33
(1-u2)2 F1(u2) F3(u1) (1-u2)3-2 (1-u2)2 (1-u2)
1-u23-3u2 3u22 -2-2u224u21-u2 - u23
u22 - F4(u2) F4(u1) (1-u2)3- (1-u2)2 1
u23 - 3u2 3u22 -1- u22 2u2 u23 2 u22
- u2 - F3(u2)
This proves that reversing the direction of
parameterization preserves the shape of the
Hermite cubic curve, but the end points get
interchanged and tangent vectors get reversed.
83
Why Hermite Cubic Spline is not curvature
continuous at joint or blend points between
segments?
84
  • Let for the first curve segments data be
  • Po, Po, P1 and P11
  • And the second curve segments data be
  • P1, P12, P2, P2.
  • Also given is, P11R and P12KR, where K is a
    constant. Hence at the JOINT,
  • P11RRx Ry RzT, P12 KRKRx KRy KRzT
  • Slopes at joint are S11xRy/Rx, S11yRz/Ry,
    S11zRz/Rx, and
  • S12xKRy/KRxRy/Rx S11x, and so on.
  • Thus the two curves have C1 or slope continuity
    at P1.

85
  • Looking at the curvature continuity,
  • P(u)(12u-6)Po(-12u6)P1(6u-4)Po(6u-2)P1
  • This equation gives the curvature vector for the
    two segments at P1 as
  • P11P(1)6Po- 6P12Po4R, and
  • P12P(0)-6P16P2 - 4KR - 2P2
  • Which evidently are not same.
  • Thus, the Hermite cubic spline curve segments do
    not offer C2 continuity at the joints or blending
    points, though they have C2 continuity elsewhere
    on each segment.

86
Normal at a point on Hermite Cubic Spline
n2
P1
n3
P2
n1
Po
  • n1(P1 Po)/P1 Po and n2P2/P2
  • n4n1n2/n1n2 and the normal vector therefore
    is nn3n4n2/n4n2
  • Another simpler method using our thumbrule is
  • n3x-n2y and n3yn2x
  • Because n2 and n3 form a anti-clockwise pair of
    perpendicular unit vectors.

87
For points A1,2 and B3, 1 with
corresponding slopes 600 and 300, write the
formulation of Hermite cubic spline.
88
Generating the hermit curve in Excel
89
(No Transcript)
90
(No Transcript)
91
Sample Hermite Curves
92
Blending Functions
  • By multiplying first two components, you have
    four functions of t that blend the four control
    parameters

93
Hermite Blending Functions
  • If you plot the blending functions on the
    parameter t

94
Exercise for Hermite Curve
  • Find the shape of the Hermite curve if
  • P(0) 2, 3
  • P(1) 4, -2
  • P(0) cos 45, sin 45
  • P(1) cos (-45), sin(-45)
Write a Comment
User Comments (0)
About PowerShow.com