0% found this document useful (0 votes)
72 views

Practical 3 Introductory Exercise of Analytic and Synthetic Curves

(1) Wireframe models are the simplest geometric models to construct but can be ambiguous representations of real objects. They consist of points and connecting lines. (2) Curves can be described mathematically through parametric or non-parametric equations. Parametric representation allows curves to be defined more easily and replaces slopes with tangent vectors. (3) Analytic curves like lines and circles can be represented parametrically through equations involving a parameter. Synthetic curves defined by control points are also needed for design flexibility and to model measured data points.

Uploaded by

huk
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Practical 3 Introductory Exercise of Analytic and Synthetic Curves

(1) Wireframe models are the simplest geometric models to construct but can be ambiguous representations of real objects. They consist of points and connecting lines. (2) Curves can be described mathematically through parametric or non-parametric equations. Parametric representation allows curves to be defined more easily and replaces slopes with tangent vectors. (3) Analytic curves like lines and circles can be represented parametrically through equations involving a parameter. Synthetic curves defined by control points are also needed for design flexibility and to model measured data points.

Uploaded by

huk
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Practical 3

Introductory Exercise of Analytic and


Synthetic Curves.
1. Wireframe models
There are three types of geometric models, wireframes, surfaces and solids.
Typically, a wireframe model consists of a finite set of points (vertices), connected in
pairs by straight lines (edges), or arcs, circles, conics, and curves, so that the three-
dimensional form of a solid object can be visualized.

The major advantage of wireframe modeling is its simplicity to construct. It does not
require as much computer time and memory as does surface or solid modeling.
Wireframe modeling is considered a natural extension of traditional methods of drafting.
Consequently, it does not require extensive training of users; nor does it demand the use
of unusual terminology as surfaces and solids. Wireframe models form the basis for
surface models. Most existing surface algorithms require wireframe entities to generate
surfaces.

The disadvantages of wireframe models are manifolds. Primarily, wireframe models


are usually ambiguous representations of real objects and rely heavily on human
interpretation. A wireframe model of a box offers a typical example where the model
may represent more than one object depending on which face(s) is assumed to exist.
Models of complex designs having many edges become very confusing and perhaps even
impossible to interpret. Moreover, as shown in Figure 1, it is often difficult to display
objects with curve surfaces using wireframe.

Figure 1. Displaying holes and curved ends in wireframe models


2. Parametric curves
2.1 Curve representation

Curves can be described mathematically by nonparametric or parametric equations.


Nonparametric equations can be explicit or implicit. For a nonparametric curve, the
coordinates y and z of a point on the curve are expressed as two separate functions of
the third coordinate x as the independent variable [see Equation (1)]. This curve
representation is known as the nonparametric explicit form. If the coordinates x, y and z
are related together by two functions [see Equation (2)], a nonparametric implicit form
results.

P  x z   x f x  g x 
T T
y (1)
F  x, y , z   0
G  x, y , z   0 (2)

There are three problems with describing curves using nonparametric equations:

(1) If the slope of a curve at a point is vertical or near vertical, its value becomes
infinity or very large, a difficult condition to deal with both computationally and
programming-wise. Other ill-defined mathematical conditions may result.

(2) Shapes of most engineering objects are intrinsically independent of any


coordinate system. What determines the shape of an object is the relationship
between its data points themselves and not between these points and some
arbitrary coordinate system.

(3) If the curve is to be displayed as a series of point or straight-line segments, the


computations involved could be extensive.

Parametric representation allows closed and multiple-valued functions to be easily


defined and replaces the use of slopes with that of tangent vectors, as will be introduced
shortly.

In parametric form, each point on a curve is expressed as a function of a parameter


u. The parametric equation for a three-dimensional curve in space takes the following
vector form:

Pu   x z   xu  y u  z u  , u min  u  u max


T T
y (3)

Equation (3) implies that the coordinates of a point on the curve are the components of
its position vector.
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), as shown in fig.

u
u=0 u = umin u = umax
Parametric space

Y umax X
P(x, y, z)

umin
n̂ P’(u) x’(u)

u
k̂ u = umin u u = umax
iˆ X
Y y’(u)
Z Cartesian space

u
u
Z
z’(u)

u
u
Curve components in parametric space

Figure 2. Parametric representation of a three-dimensional curve

The tangent vector is defined as vector

dPu 
P u  
du (4)

The components of the tangent vector in the parametric space as

P u   x  y  z   x u  y u  z u  , u min  u  u max


T T
(5)

where x’(u), y’(u), and z’(u) are the first parametric derivatives (with respect to u) of the
position vector components x’(u), y’(u), and z’(u) respectively. The slopes of the curve are
given by the ratios of the components of the tangent vector:

dy dy / du y 
 
dx dx / du x 
dz z  dx x 
 and 
dy y  dz y 
(6)
2.2 Parametric representation of analytic curves

There are two categories of curves that can be represented parametrically: analytic
curves and synthetic curves. Analytic curves are defined as those that can be described
by analytic equations such as lines, circles, and conics. Synthetic curves are the ones that
are described by a set of data points (control points) such as splines and Bezier curves.

Lines and circles are often expressed in analytic equations. They can also be
expressed using parametric representation:

Lines

The parametric equation of the line becomes

P  P1  uP2  P1 , 0  u  1
(7)

In scalar form, this equation can be written as

x  x1  u x2  x1  

y  y1  u  y 2  y1 
z  z1  u z 2  z1   0  u  1
(8)

Note that Equation (7), a line is expressed as a synthetic curve.

Circles

Circles and circular arcs are among the most common entities used in wireframe
modeling. Regardless of the user input information to create a circle, such information is
always converted into a radius and center by the software.

The parametric equation of a circle can be written as

x  xc  R cos u 

y  y c  R sin u 
z  zc 
 , 0  u  2
(9)

For display purposes, Equation (9) can be used to generate points on the circle
circumference by incrementing u from 0 to 360 degrees. These points are in turn
connected with line segments to display the circles. However, this is an inefficient way
due to computing the trigonometric functions in the equation for each point. A less
computational method is to write Equation (9) in an incremental form.
x n  xc  R cos u
y n  y c  R sin u
x n 1  xc  R cosu  u 
y n 1  y c  R sin u  u 
z n 1  z n
(10)

Expanding the x n 1 and y n1 equation gives

x n 1  xc  x n  xc  cos u   y n  y c sin u
y n 1  y c   y n  y c  cos u  x n  xc sin u
z n 1  z n
(11)

Thus, the circle can start from an arbitrary point and successive points with equal
spacing can be calculated recursively. The increments cos u and sin u have to be
calculated only once, which eliminates computation of trigonometric functions for each
point.

3. Synthetic curves
3.1 The need for synthetic curves

The need for synthetic curves in design arises on two occasions: when a curve is
represented by a collection of measured data points and when an existing curve must
change to meet new design requirements. Analytic curves are usually not sufficient to
meet geometric design requirements of mechanical parts. Synthetic curves provide
designers with greater flexibility and control of a curve shape by changing the positions
of the control points. Products such as car bodies, ship hulls, airplane fuselage and wings,
propeller blades, shoe insoles, and bottles are a few examples that require free-form, or
synthetic, curves and surfaces. Considering that most data of objects are available in a
discrete form, mainly key points, the curve equation should be able to accept points
and/or tangent values as input from the designer.

Splines draw their name from the traditional draftsman’s tool called “French curves
or splines.” In drafting terminology, a spline is a flexible strip used to produce a smooth
curve through a designated set of points. Several small weights are distributed along the
length of the strip to hold it in position on the drafting table. The term spline curve
referred to a curve drawn in this manner.

We specify a spline curve by giving a set of coordinate positions, call control points,
which indicate the general shape of the curve. These control points are then fitted with
piecewise continuous parametric polynomial functions in one of the two ways. When
polynomial sections are fitted so that the curve passes through each control point, the
resulting curve is said to interpolate the set of control points. On the other hand, when
the polynomials are fitted to the general control point path without necessarily passing
through any control point, the resulting curve is said to approximate the set of control
points.

Interpolation curves are commonly used to digitize drawings or to specify animation


paths. Approximation curves are primarily used as design tools to structure object
surfaces.

Mathematically, synthetic curves represent a curve-fitting problem to construct a


smooth curve that passes through given data points. Zero-order continuity C  yields a
0

position continuous curve. First C  - and second C  -order continuities imply slope
1 2

1
and curvature continuous curves respectively. A C curve is the minimum acceptable
curve for engineering design. A cubic polynomial is the minimum-order polynomial that
can guarantee the generation of C0, C1 or C2 curves.

Higher-order polynomials are not commonly used in CAD systems because they
tend to oscillate about control points, are computationally inconvenient, and are
uneconomical of storing curve and surface representations in the computer.

Also, the designer may prefer to control the shape of the curve locally instead of
globally by changing the control point(s). If changing a control point results in changing
the curve locally in the vicinity of that point, local control of the curve is achieved;
otherwise global control results.

◇Assignment 4

Describe the synthetic curves supported by your CAD software. Draw a few 3d
curves to show how you generate and modify these curves? Are they interpolation
curves or approximation curves? ◇

3.2 Hermite Cubic Splines

The Hermite form of a cubic spline is determined by defining positions and tangent
vectors at the data points, as shown in Figure 3.

Y
P1

P0 P1 ( u = 1)

P0 ( u = 0) X

V
Z
The parametric cubic spline curve (or cubic spline for short) connects two data (end)
points and utilizes a cubic equation. Therefore, four conditions are required to determine
the coefficients of the equation. The parametric equation of a cubic spline segment is
given by

3
P u    C i u i ,
i 0 0  u 1 (12)

where u is the parameter and Ci are the polynomial (also called algebraic) coefficients. In
scalar form this equation is written as

xu   C3 x u 3  C 2 x u 2  C1x u  C 0 x
yu   C3 y u 3  C 2 y u 2  C1 y u  C 0 y
z u   C3 z u 3  C 2 z u 2  C1z u  C 0 z (13)

In an expanded vector form, Equation (12) can be written as

Pu   C 3u 3  C 2 u 2  C1u  C 0 (14)

This equation can also be written in a matrix form as

Pu   U T C (15)


where U  u u u 1 and C  C3
3 2

T
C2 C1 C0  , and C is called the
T

coefficients vector. The tangent vector is

3
P ' u    C i iu i 1 ,
i 0 0  u 1 (16)

Now the problem is how to relate the parametric equations to the designers’ input,
namely, the two end points and tangent vectors. Applying the boundary conditions (P0,
P’0 at u=0 and P1, P’1 at u=1), Equations (12) and (16) give

P0  C0
P0  C1
P1  C3  C2  C1  C0
P1  3C3  2C2  C1 (17)
C 0  P0
C1  P0

C 2  3P1  P0   2 P ' 0  P '1 
C 3  2P0  P1   P 0  P 1' '
(18)
Substituting Equation (18) into Equation (14) and rearranging gives

       
Pu   2u 3  3u 2  1 P0   2u 3  3u 2 P1  u 3  2u 2  u P ' 0  u 3  u 2 P '1
0  u 1 (19)

Pu   U T M H V, 0  u  1 (20)

where [MH] is the Hermite matrix and V is the geometry (or boundary conditions) vector.
Both are given by

 2 2 1 1
 3 3  2  1
M H    
0 0 1 0
 
1 0 0 0 (21)


V  P0 P1 P '0 P '1 
T
(22)

3.3 Blending Cubic Spline Segments

Equation (19) is for one cubic spline segment. It can be generalized for any two
adjacent spline segments of a spline curve that are to fit a given number of data points.
This introduces the problem of blending or joining cubic spline segments which can be
stated as follows: given a set of n points P0, P1, …, Pn-1 and the two end tangent vectors
P’0 and P’n-1 (as shown in Figure 4), connect the points with a cubic spline curve.

Pn1
Y
Spline segments +
Pn -1
P0 +
Pn -2
+ + +
+
P1 P2 P4
P3
+
P0
X

Figure 4. Hermite cubic spline curve

Let’s start from connecting two curves. To connect two Hermite spline curves to
form a C2 continuous curve, the second derivative at the end of the first curve must be
equal to the second derivative at the beginning of the first curve. Thus we have

P " u1  1  P " u 2  0 (23)


Using this relation, we can further derive the tangent vector at the end of the
second curve, which is also the tangent vector at the beginning of the second curve:

P '1  
1
4

3P0  P ' 0  3P2  P ' 2 
(24)

Using this information, we can construct a C2 continuous curve that passes through
the three given data points by blending two Hermite curves together. For N given data
points, Equation (23) and (24) have to be used iteratively to obtain the tagent vector at
the intermediate data points.

The use of the cubic splines in design applications is not very popular compared to
Bezier or B-spline curves. The control of the curve is not very obvious from the input data
due to its global control characteristics. As shown in Figure 5, changing the position of a
data point or an end slope changes the entire shape of the spline, which does not
provide the intuitive feel required for design. In addition, the order of the curve is always
constant (cubic) regardless of the number of data points.

P1

V1
P0

V0

P1*
V1*
P1 P1
V1
V1
V1*
P0 P0

V0
V0

(a) Change of end slopes (b) Change of data points

Figure 5. Control of cubic spline curve

3.4 Lagrangian Interpolation Method

Often we have to display a curve interpolating through several points. Beside


blending Hermite cubic spline segments, this can also be done by using the Lagrangian
interpolation method. Equation (25) is the Lagrangian four-point form. It is easy to verify
that at u=0, 1/3, 2/3, 1, the curve interpolates through P0, P1, P2, and P3.
Pu   1  u 2  3u 1  3u P0
1
2
 1  u 2  3u P1
9u
2
 1  u 3u  1P2
9u
2
 2  3u 1  3u P3
u
2 , 0  u 1

You might also like