Professional Documents
Culture Documents
Dr P. RAVINDER REDDY
Professor
Dept. of Mechanical Engineering,
Chaitanya Bharathi Institute of Technology
Hyderabad-500 075,AP
Email: ravinderreddyp_mech@cbit.ac.in
UNIT – II
Modelling of Curves:
❖Properties of splines
❖Synthetic curves :
• Cubic Curve
• Bezier Curve
• B-Splines Curve
• Non Uniform Rational B-Splines
Modelling of Curves
Design of curved shapes should satisfy the
following requirements
1. It should be possible to represent the shape
mathematically.
2. The modeling should involve minimum
computation.
3. It should be possible to generate a CNC
program to machine the surface (2, 3, 4 and 5
axis machining) or to prepare a mould or die to
make the part (as in plastic molding or casting
or automobile panel pressing)
Properties of a spline curve
1. Control points (knots, interpolation, and
extrapolation): A common way to control the
shape of a curve interactively is to locate points
through which the curve must pass or points
that control the curve’s shape in a predictable
way. These points are called control points. or
sometimes knots when they lie on the curve
itself. A curve is said to interpolate the control
points if it passes through them.
2. Multiple values: A curve is not a graph of single
valued function coordinate, irrespective of the
choice of coordinate system (See Fig.1).
Figure 1: A curve can be multivalued with respect to all coordinate system.
(2)
In order to find the coefficients Ci, consider the cubic spline curve with
the two endpoints P0 and P1 shown in Fig.1. Applying the boundary
conditions (P0, P0’ at u=0, and P1, P’1 at u=1), Eqs. (1) and (5) give
P0 = C0
P’0 = C1
P1 = C3 + C2 + C1 + C0 (6)
The function of u in Eqs.(8) and (9) are called blending Functions( or Hermite
functions or Weighting functions). The first two functions blend P0, P1, and the
second two blend and . Equation (8) can be written in a matrix form as
Where [MH] is the Hermite matrix and V is the geometry (or boundary conditions)
matrix. Both are given by
(11)
Comparing Eq.(4) and (10) shows that or
Where
(13)
is given by
(15)
Equation (8) describes the Hermite cubic spline curve in
terms of its two end points and their tangent vectors.
1. The equation shows that the curve passes through the
end points (u=0 and 1).
2. It also shows that the curves shape can be controlled by
changing its end points or its tangent vectors.
3. 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 magnitudes or the directions of the tangent
vectors P’0 and P’1
➢For planar splines, tangent vectors can be replaced
by slopes.
➢In this case, a default value, such as 1, for the
lengths of the tangent vectors might be assumed
by the software to enable using Eq.(8).
➢For example, if the slope at P0 is given as 30
degrees, then P’0 becomes [cos30 sin30 0].
➢It is obvious that the slope angle and the
components of P’0 are given relative to the axes of
the WCS that is active when the spline segment is
created.
• Equation(8) is 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 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 two end
tangent vectors P’0 and P’1, connect the points
with cubic spline curve.
• The spline curve is created as a blend of spline
segments connecting the set of points starting
from P0 and ending at Pn-1.
• The use of cubic splines in design applications is
not very popular due to the need for tangent
vectors or slopes to define the curve.
• Also, the control of the curve is not very obvious
from the input data due to its global control
characteristics.
• For example, 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.
Fig.2: Shows the control aspects of Hermite cubic spline curve
Now equation(8) can be written as
The two end points are P0 and P2. Substituting into Eq.(8) gives
Bezier Curves
For a Cubic Bezier Curve
• A Bezier curve is blended at the joints and is completely defined
by four consecutive points P0(x0, y0), P1(x1, y1), P2(x2, y2) and P3(x3,
y3).
• The curve passes through the first and fourth point. The two
intermediate points are used to define the slope of the curve at
the end points.
• If x0, x1, x2 and x3 are x-coordinates of the control points, it is
assumed that
=Binomial Coefficient
Characteristics of Bezier Curve
1. The curve interpolates the first and last control
points, that is it passes through P0 and Pn if u=0
and u=1
P(0)= P0, P(1)= Pn
2. The curve is tangent to the first and last segments
of the characteristic polygon.
The rth derivative at the end points is
3. The curve is symmetric with respect to u and (1-u).
This means that the sequence of control points
defining the curve can be reversed without change
of the curve shape; i.e reversing the direction of
parameterization does not change the curve shape.
4. The interpolation polynomial has a max value of
c(n, i) (1-i/n)n-i occurring at u = i/n which can be
obtained from the eqn.d /du=0. This implies that
each control point is most influential on the curve
shape at u= i/n. Ex. For Cubic Bezier curve P0, P1, P2
and P3 are most influential when u=0 ,1/3,2/3 and 1.
Therefore each control point is weighted by its
blending function for each u value.
5. The curve shape can be modified either changing one
or more vertices of its polygon or by keeping the
polygon fixed and specifying multiple coincident
points at a vertex.
6. A closed Bezier curve can simply be generated by
closing its characteristic polygon or choosing P0 and Pn
to be coincident.
7. When complicated Curves are to be generated,
they can be formed by piecing several Bezier
sections of lower degree together. Piecing
together smaller sections also gives us better
control over the shape of the curve in small
regions.
Since Bezier curves pass through end points, it is easy
to match curve sections (Zero order continuity).
Partition of unity:
1
(6.92)
where
(6.93)
- -
<
≤ ≤ (6.94)
>
≤ ≤ (6.95)
(6.96)
-
> (6.97)
-
- -
-
-
( ) ( ) ( ))
≤ ≤
< ≤
≤ ≤
<
/ >
≤ ≤
( ) ≤ ≤
, , ,
≤ ≤
,
, , ,
, , , ( ) ,
, ( ) ( )
, , , ( ) ,
, ( ) ( )
, , , ( ) ,
( ) ( ) ( ) ,
,
, , ( ) ,
, ( ) ( ) , ,
, , , ( ) ,
, ( ) ( ) ( )
, , ( ) , ( ) ,
, ( ) ( )
, ,
, ( ) ( ) ( )
, , , ( ) ,
, ( ) ( ) ( ) ( ) ,
, ,
, ( ) ( ) , ( ) , ( ) ,
, , ,
, ( ) ( ) , ( ) ,
, , , ,
, ( ) ( ) ( ) ( )
, ,
, ( ) ( ) ( ) ,
, ,
, ( ) ( ) ( ) ,
, ,
, ( ) ( ) ( ) ,
, ,
, ( ) ( ) ,
( ) ( ) ( ) ( ) , ≤ ≤
( ) ( ) ( ) ( ) ≤ ≤
≤ ≤
( ) , , , , ≤ ≤
, ( ) , (( ) )
, ( ) , (( ) )
, ( ) , (( ) )
, ( ) , (( ) )
( ) , (( ) ) , (( ) )
, (( ) ) , (( ) ) ≤ ≤
≤ ≤
,
≤ ≤
,
≤ ≤
,
≤ ≤
,
, ,
, ( ) ( ) , ( ) ,
, ,
, ( ) ( ) ( ) , ( ) ,
, ,
, ( ) ( ) ( ) , ( ) ,
, ,
, ( ) ( ) , ( ) ,
, ( ( ) ( )( )) , ( ) ,
, ,
, ( ) ( ) ( ) , ( ) ,
( ) , (( )( ) ( )( )) , ( ) ,
, ( ) ( ) , ( ) ,
( ) , ( ( ) ( )( ) ( )( ) ) .,
( ( ) ( )( )( ) ( ) ( )) , ( ) ,
, [ , (- ) , ( ) ,
(- ) , ]
≤ ≤
≤ ≤
≤ ≤
≤ ≤
( ) , ( ) , ( )
+ , ( ) , ( )
, ( ) , ( ) , ( ) , ( )
( ) , ( ) , ( ) , ( ) , ( )
( ) , ( ) , ( ) , ( ) , ( )
( ) , ( ) , ( ) ,( ) , ( )
( ) , ( ) , ( ) , ( ) , ( )
( ) , ( ) , ( ) , ( ) , ( )
Prob.3: Construct a B-Spline curve of 2nd order with 4 Polygon
vertices P0(1, 1), P1(2, 3), P2(4, 3), P3(3, 1).
The knot vector set for a second order curve defined by four
polygon vertices is
( ) ≤ ≤
, , ,
≤ ≤
,
, , ,
, , , ( ) ,
, ( ) ( )
, , , ( ) ,
, ( ) ( )
, , , ( ) ,
( ) ( ) ( ) ,
,
, , ( ) ,
, ( ) ( ) , ,
, , , ( ) ,
, ( ) ( ) ( )
, , ( ) , ( ) ,
, ( ) ( )
, ,
, ( ) ( ) ( )
, , , ( ) ,
, ( ) ( ) ( ) ( ) ,
, ,
, ( ) ( ) , ( ) , ( ) ,
, , ,
, ( ) ( ) , ( ) ,
, , , ,
, ( ) ( ) ( ) ( )
, ,
, ( ) ( ) ( ) ,
, ,
, ( ) ( ) ( ) ,
, ,
, ( ) ( ) ( ) ,
, ,
, ( ) ( ) ,