Practical 3 Introductory Exercise of Analytic and Synthetic Curves
Practical 3 Introductory Exercise of Analytic and Synthetic Curves
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.
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.
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
dPu
P u
du (4)
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
P P1 uP2 P1 , 0 u 1
(7)
x x1 u x2 x1
y y1 u y 2 y1
z z1 u z 2 z1 0 u 1
(8)
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.
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 cosu u
y n 1 y c R sin u u
z n 1 z n
(10)
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.
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? ◇
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
xu C3 x u 3 C 2 x u 2 C1x u C 0 x
yu 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)
Pu 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
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 3P1 P0 2 P ' 0 P '1
C 3 2P0 P1 P 0 P 1' '
(18)
Substituting Equation (18) into Equation (14) and rearranging gives
Pu 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)
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)
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.
Pn1
Y
Spline segments +
Pn -1
P0 +
Pn -2
+ + +
+
P1 P2 P4
P3
+
P0
X
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 '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