1. There are many ways to represent curves.
2. For common curve shapes, there are mathematical formulas, such
as the equations for a line or a circle.
3. Many geometric shapes can be represented by an appropriate
combination of these basic curves.
4. Circles, lines, and other simple shapes don't necessarily adequately
reflect the flowing lines of a car's profile or the features of a human
face.
5. Point-based descriptions may use points picked along a given
shape, but such a description is generally incomplete. Smooth
curves need representations with a finite number of points.
6. Few objects are effectively described by a method based purely on
points. It's important to define how shapes change between known
points, which are typically not linear. In order to resolve the above
problem the concept of synthetic curves is developed.
Where, P2, P1 = Vectors of starting and ending points respectively.
P = Vector of any middle point whose co-ordinates are required to
find out.
Storing Array of Coordinate Data needs huge memory space
Storing Analytical Equation needs less Memory space
Non Parametric representation of Curves
disadvantages: -
1. Required to solve equations.
2. When Slope tends to infinity that is division by
Zero Software can not handle situation cannot
handle more coordinate systems simultaneously.
3. If the curve required is described as series of
straight lines data to be stored is too larger.
Analytic curves are usually not sufficient to meet geometric
design requirements of mechanical parts.
Products such as car bodies, ship hulls, airplanes fuselage and
wings, propeller blades, shoe insoles and bottles are a few
examples that require free form, or synthetic curves and surfaces.
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.
In the latter occasion, the designer would need a curve
representation that is directly related to the data points and is
flexible enough to bend, twist or change the curve shape by
changing the one or more data points. Data points are called
control points and the curve itself is called an interpolant if it
passes through all the data points.
[a] Representation of line by non parametric way:
Equation of line y = mx + c
if line is to be plotted using above equation, steps involved are
i. solve two simultaneous equations
ii. calculate m and c
iii. decide about increment
iv. calculate y for various x
Let starting point of line 10, 10 and ending point of line 50, 30
10 = 10m + c, 30 = 50m + c
m = 0.5 and c = 5
m < 1, x to be incremented Answer:
Calculate y for x from 10-50
X Y
10 10
20 15
30 20
40 25
50 30
[b] Representation of line by parametric way:
Let starting point of line 10, 10 and ending point of line 50, 30
Parametric equation of a line: P = P1 + U(P2-P1)
PX = X1 + U(X2-X1) = 10+U(40) = 10+40*U
Py = Y1 + U(Y2-Y1) = 10+U(20) = 10+30*U
Calculate X and Y for U from 0 to 1
PX = X1 + U(X2-X1) = 10+U(40) = 10+40*U
PY = Y1 + U(Y2-Y1) = 10+U(20) = 10+20*U Answer:
U X Y
0.0 10 10
0.25 20 15
0.5 30 20
0.75 40 25
1.0 50 30
[c] Representation of circle by non parametric way:
Equation of circle: X2+Y2 = R2
If a circle is to be plotted using above equation, steps involved are
1. Rewrite equation Y = (R2-X2) 0.5
2. Calculate the range for X
3. Calculate various values of Y for X
4. Let the center of circle at 0, 0 and radius of circle be 50
5. Range for X: 0 to 50 and the increment in X be 10
6. Calculate y for X from 10-50
Answer:
X Y Approx. Y
0 50 50
10 48.98 49
20 45.83 46
30 40 40
40 30 30
50 0 0
[d] Representation of circle by parametric way:
Let the center of circle at 0, 0 and radius of circle be
50
Equation of circle: X2+Y2 = R2
Parametric equation of a circle:
PX = R*COS (U) 0<U<2
PY = R*SIN (U) 0<U<2
Answer:
X Y
0 50 0
/4 35.35 35.35
/2 0 50
-
3 /4 35.35
35.35
- 50 0
Parametric curves have three necessary components:
Parameter values
Control points
Basis (or blending) functions
The most popular mathematical representations for a flexible
element form have been parametric.
In these representations, curves and surfaces are described by
equations which are expressed in terms of a variable, known as a
parameter.
By evaluating any desired parameter value, the exact form and
position of the item at that value may be known.
Parameters are numbers that identify relative position on graphic
elements. Parametric curves represent the absolute position of
every point on a curve as a function of a parameter. This parameter
ranges between a specified low value and a specified high value.
For example, the beginning of a curve may be assigned the
parameter value 0 and its end may be given the value of 1.
The point corresponding to 0.5 will lie somewhere along the curve
between the two, 0.1 will be closer to 0 than 0.5, and so on.
Since the parameter value indicates relative position along the
element, larger parameter values are always further along the
curve.
When working with curves, the parameter is normally called u. For
any allowable value of u, the corresponding absolute position of
the curve (i.e., its xyz coordinates) may be determined.
Let's consider another example: a graph with horizontal and
vertical axes.
The horizontal axis shows the parameter values and the vertical
axis shows the relative contribution of each control point.
The actual values of the control points are the coordinates of the
endpoints and do not appear on the graph.
The graph is a pictorial way of showing the contribution of the
endpoints to the curve, wherever they are in space. It illustrates
blending, or basis functions.
Each of the curves in the graph example shows the relative
contribution of its control points' coordinates to the final curve.
Blending function is joining two curves.
Properties of curves position continuity, tangency, and
curvature
Naturally, a curve has position. Its endpoints and what lies in
between are defined by the control points, basis functions, and
parameter values.
A curve also has direction. At any given point along a curve, it
has a tangent vector (the direction in which it is pointing).
Perpendicular to the tangent vector is a normal vector (in two-
dimensions) or a normal plane (in three-dimensions). Tangents and
normals are directional properties.
Curvature is another concept. A curve with zero curvature is straight.
A curve with a constant curvature is a circular arc. Where a curve is
more tightly bent, its curvature is higher.
As a matter of convenience, curvature may be expressed in terms of
the radius of the bend (radius of curvature) at a given location.
Curvature is then easily defined as the reciprocal of the radius of
curvature. A small radius has high curvature, while a large radius has
low curvature.
Zero Curvature Infinite
Radius of Curvature
Constant Curvature Circular Arc
Small Curvature
Large Radius of
Large Curvature Small
Curvature
Radius of Curvature
If the elements touch, there is positional continuity between
them. If they slope in the same direction, there is tangent continuity.
If they have the same curvature values where they meet, there is
curvature continuity.
Higher levels of continuity depend on lower levels. If two curves
don't touch, they won't have tangent continuity with each other. If
they aren't tangent to each other, they won't have curvature
continuity.
Positional continuity (also known as zero-order continuity) is
called GO (geometric) or CO (parametric). Tangent continuity (first-
order) is called G1 or C1.Curvature continuity (second-order) is
called G2 or C2.
Major CAD/CAM systems provides three types of synthetic curves:
Hermetic cubic spline, Bezier, and B-spline curves.
The cubic spline curve passes through the data points and
therefore is an interpolant.
Bezier and B-spline curves in general approximate the data points,
that is, they do not pass through them.
Both the cubic spline and Bezier curves have a first order
continuity and the B-spline curve has a second order continuity.
HERMITE CUBIC SPLINE
Parametric spline curves are defined as piecewise polynomial curves
with a certain order of continuity.
A polynomial of degree N has continuity of derivatives of order (N -
1).
Parametric cubic splines are used to interpolate to given data, not to
design free-form curves as Bezier and B-spline curves do.
Splines are functions that are used for fitting a curve by interpolation
through number of data points.
The parametric cubic spline curve connects two data (end) points
and utilizes a cubic equation.
Therefore, four conditions are required to determine the coefficients
of equation. When the position of two end points and the tangent
vectors at that points are given it results into Hermite cubic spline.
Hermite cubic spline defined by:
A spline passes through two end points and satisfies the slope
conditions at two end points.
Where U is Parameter and C is polynomial coefficient
In matrix form,
Where, U =[U3 U2 U 1]T and C =[C3 C2 C1 C0]
A curve also has direction. At any given point along a curve, it has
a tangent vector (the direction in which it is pointing).
Perpendicular to the tangent vector is a normal vector (in two-
dimensions) or a normal plane (in three-dimensions). Tangents
and normals are directional properties.
Tangent Vector:
The input data for Hermite Cubic Spline is:
1.Coordinates of point P1 and P2
2.Slope at point P1 and P2
Where U=0 at P1, and U=1 at P2
Using this data polynomial coefficients C0,C1,C2,C3 are to be
calculated.
Applying boundary conditions, for P0: U=0 and for P1: U=1
P0 = C0
P1 = C3+C2+C1+C0
Solving the 4 simultaneous equations, we get
C0 = P0
C2 = 3(P1-P0)- -
C3 = 2(P0-
Substituting these values into the above two equations,
Consider an example:
P0 = [10 15 20] and P1 = [40 60 50]
Tangent Vector at P0 = [1 1 1] Tangent Vector at P1 = [2 3 4]
Therefore when U varies in between 0 to 1, then the values of X, Y
and Z for different points are,
U X Y Z
0.0 10.0 15.0 20.0
0.25 14.7344 22.0313 24.6406
0.50 24.8750 37.2500 34.6250
0.75 35.0781 52.5938 44.7969
1.0 40 60.0 50
The two equations describes the Hermite cubic spline curve
in terms of its two end points and their tangent vectors. The equation
shows that the curve passes through the end points (u = 0 and 1). It
also shows the shape can be controlled by changing its end
points or its tangent vectors. If the two end points P0 and P1 are
fixed in space, the designer can control the shape of the spline by
changing either the magnitude or the direction of the tangent vectors
0 and 1.
These two equations are derived for one cubic spline
segment. It can be generalized for any two adjacent spline segments
of a spline curve that is to fit a given number of data points. This
introduces the problem of blending or joining cubic spline segments.
Solution:
Curvature continuity condition is applied to obtain slopes at
intermediate points
To understand the concept of blending and its mathematical
formulation it is required to solve given problem.
P0 = [10 15 20]
P1 = [40 60 50]
P2 = [70 90 60]
Tangent Vector 0 At P0 = [1 1 1]
Tangent Vector 2 At P2 = [2 3 4]
Calculate the tangent vector when P1 = [40 60 50].
Calculate the tangent vector when P1 = [40 60 50].
If P1 is end point on first segment U = 1 and P1 is start point on
second segment U = 0, therefore,
First U X Y Z
Segment 0.0 10 15 20.0
0.25 16.9727 24.855 26.1758
0.5 30.8438 44.7813 38.7180
0.75 79.30 61.0664 49.4023
1 40 60 50
Second U X Y Z
Segment 0.0 40 60 50
0.25 38.1602 56.4761 47.3320
0.50 49.0313 67.4688 50.9063
0.75 62.8867 82.2070 56.5723
1.0 70 90 60
Bezier Curves
Cubic splines are based on interpolation techniques while
Bezier and B-spline curves are based on approximation techniques.
The major differences between the Bezier curve and the cubic
spline are:
1.The shape of the Bezier curve is controlled by its defining points
only. First derivative are not used in the curve development as in the
case of the cubic splines. This allows the designer a much better feel
for the relationship between input (points) and output (curve).
2.The order or the degree of Bezier curve is variable and is related to
the number of points defining it; n + 1 points define an nth degree
curve which permits higher order continuity. This is not the case
for cubic splines where the degree is always cubic for a spline
segment.
3.The Bezier curve is smoother than the cubic spline because it has
higher order derivatives.
The Bezier curve is defined in terms of the locations of n + 1 points.
These points are called data or control points.
They form the vertices of what is called the control or Bezier
characteristics polygon which uniquely defines the curve shape as
shown in the following diagram.
Only the first and last points or vertices of the polygon actually lie on
the curve. The other vertices define the order, derivatives and shape
of the curve. The curve is also tangent to the first and last polygon
segments. In addition, the curve shape tends to follow the polygon
shape.
Parametric representation of Bezier curves:
Where P(u) is any point on the curve and Pi is a control point. Bi,n
are the Bezier polynomials and they serves the purpose of
Blending and is given by:
Where C(n,i) is the binomial coefficient,
Consider a third degree Bezier curve with control points = 4 therefore n
=3 & i = (0,1,2,3). So calculate the value of Bi,n when the i changes from
0 to 3.
for i = 0,
for i = 1,
for i = 2,
for i = 3
Example:
Let P0 = [ 10 15 10 ]
P1 = [ 15 25 25 ]
P2 = [ 18 28 35 ]
P3 = [ 25 21 40 ]
U X Y Z
0.0 10 15 10
0.25 13.4688 21.1406 20.3125
0.50 16.7500 24.3750 28.7500
0.75 20.4063 24.4219 35.3125
1.0 25 21 40
Blending of Bezier curve:
Consider a case of blending of two Bezier segments. To
achieve zero order continuity, it is sufficient to make one of the
end control points of the segments common.
But to achieve a first order continuity, the end slope of one
segment must equal the starting slope of the next segment.
This condition requires that the last segment of the first polygon
and the first segment of the second polygon form a straight line.
Thus, C0 means simply that the two adjacent curves share a
common endpoint.
C1 means that the two curves not only share the same endpoint,
but also that they have the same tangent vector at their shared
endpoint, in magnitude as well as in direction.
C2 means that two curves are C1 and in addition that they have the
same second order parametric derivatives at their shared
endpoint, both in magnitude and in direction.
B-Splines:
1. B-splines were designed to address the limitations of Bezier curves
while keeping their advantages. B-splines may be thought of much like
a series of connected Bezier segments. The B-spline basis functions
are very similar to their corresponding Bezier basis functions, except
they don't use every control point at once.
2. Like Bezier curves, B-splines of a given degree need a certain
minimum number of control points (the degree + 1). However, B-
splines allow many more points to be used without affecting the
curve's degree. This is done by evaluating only a few control points at
a time. For instance, a cubic B-spline may have ten control points, but
it only evaluates four of them for any given location on the curve. Each
piece of the curve is governed by its own local control points.
3. B-Spline curves have the ability to interpolate or approximate a set of
given data points. Interpolation is useful in displaying design or
engineering results such as stress or displacement distribution in a
part while approximation is good to design free form curves.
Local control of B-Splines:
Because of this local usage of control points, sections of a curve may be
locally controlled. That is, one control point can only affect a specific
region of the curve.
To delineate the sections of a curve, specific parameter values are
assigned where the pieces will join.
These parameter values are known as knots, since they are located where
the curve sections are tied together.
B Spline curve defined by n+1 control points Pi is given by:
Ni,k(u) are the B-Spline functions.
The parameter k controls the
degree (k-1) of the resulting
B-Spline curve and is
usually independent of the
number of control points.
Parameter u varies in between 0 to (n-k+2).
Procedure to plot B-Spline:
Required Parameters are:
1. Degree of the curve
2. k parameter
3. n number of control points
4. t knot points
(n+k+1) knots are needed to create a (k-1) degree curve defined by
(n+1) control points. If n=3, k=4 therefore knots required are 8.
Decide the range for knot points.
ti = 0 if i < k
ti = i-
ti = n-k+2 if i > n
Calculations of (Ni,k) B spline functions:
Governing rules for (Ni,k): The sum of the two subscripts (i,k) of any B-
Spline function (Ni,k) cannot exceed (n+k).
If n=3 & k=4 maximum spline functions are 7.
Therefore required functions are:
N0,1 N1,1 N2,1 N3,1 N4,1 N5,1 N6,1
N0,2 N1,2 N2,2 N3,2 N4,2 N5,2
N0,3 N1,3 N2,3 N3,3 N4,3
N0,4 N1,4 N2,4 N3,4
Values of above functions are required to calculate using equations given
below:
Ni,1 = 1 if ti i+1
Ni,1 = 0 otherwise
Ni,k(u) = (u ui)[ Ni,k-1 (u)/ ui+k-1 ui ] + (ui+k u)[ Ni+1,k-1 (u)/ ui+k ui+1 ]
Use of these values of the given function in a regular equation of B-Spline:
Therefore if n=3 and k =4 , the expanded equation is:
P(u) = P0N0,4 + P1N1,4 + P2N2,4 + P3N3,4