Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

2.1. Representation of Curves: Geometric Modeling

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 88

2

GEOMETRIC MODELING

2.1. REPRESENTATION OF CURVES


Mathematically, cun'e is a continuous map from one-dimensional space to ndimensional
space. A cur„re is an infinitely large set of points. The points in a curve have a property and any
point has two neighbors except for a small number of points which have one neighbor (these are
the endpoints). Some curves have no endpoints either because they are infinite (similar to a line)
or they are closed (loop around and connect to themselves). The problem that we need to address
is how to describe a curve or to give "names" or representations to all curves so that we can
represent them on a computer. For some curves, the problem of naming them is easy since they
have known shapes such as line segments, circles, elliptical arcs, etc. A general curve which does
not have a "named" shape is SOmetimes called a free-form curve because a free-fonn curve can
take on just about any shape and it is much harder to describe.

2.1.1. Mathematical Representation of Curves curve or a surface may be described or


represented by a set of equations. There are three main ways to describe curves mathematically.

2.2 Computer
(a) Explicit:
This representation provides a mapping from a free paramctcr to the set of points on
the curve. The explicit form of a curve in two dimensions gives the value of one variable,
It may be a dependent variable in terms of the other or independent variable. A
mathematiq function y =J(x) can be plotted as a curve. Such mction is the explicit
representation curve. The explicit representation is not general since it cannot
represent vertical lines and it is also a single-valued. For cach value of x, only a single
value ofy is normally computed by the ftlnction.

(b) Intplicit:
ffs representation defines the set of points on a curvc by giving a procedure that can
test to see if a point is on the curve. Usually, an implicit curvc in two dimension is defined
by an implicit function of the form f (x, y) = 0 so that the curve is a sct of points for which
this equation is true. It is very important that the implicit function is a scalar function (it
returns a single real number). It can represent multi-valued curves (more than one y value
Aided Design and Manufacturin
for an value). A common example is the circle whose implicit representation is x 2 + y& =
R2. In three dimensions, the implicit form isfix, y, z) = 0.

(c) Parametric curve:


It provides the procedures that can generate points on the curve which do not fall into the
first two categüies. The explicit and implicit curve representations can be used only when
the function is known. In practical applications, where complex curves such as the shape
ofa car or of a flight are needed the function is normally unknown. It is the necessary
reason for the requirement of a parametric approach. The defining equations of this type
of curve are in terms of a simple and common independent variable known as parametric
variable. This free parameter (a single number) provides an index to points on the curve.
The parametric form Of a curve defines a function that assigns positions to values of the
free parameter, A dimensional parametric curve may be represented by

where x and y are co-ordinates Of the points on the curve which are the functions ofa
parameter u and the parametric variable is constrained in the interval.
In three dimensions, the parametric curve may be represented as follows.

One of the advantages of the parametric form is that it is the same in two and three
dimensions. In the fonner case, the equation for z is simply dropped.
Modeling 2.3
The parametric tilnetion is a vector valued fitnetion which returns n vector (n point
For xvorking in 2D. theN wilt be 2 vectors but in 3D thetv would be 3 vectors. Some curves can
be easily in both explicit and ituplieit For e,xatnple, a with its center at the
origin and radius I can be written in ituplieit torm given by

or in parametric form given by x,


y = cos 0, sin 0.
where 0 is the panrmetrie variable.

Different representations of curves have their own advantages and disadvantages. For
example, parametric curves are much easier to dnw because we can sample the free parameter.
Generally, parametric forms are the most commonly used in computer graphics since they are
easier to handle.
Geometric
2.1.2. Free form or Synthetic Curves
Three dimensional curves play an important Il)le in engineering, design and manufacture of a
diverse range of products such as automobiles, ship hulls, aircraft fuselages and wings, propeller
blades, shoes etc. They also play an invortant role in the description and Interpretation of physical
phenomena, för exan1ple, in geology, physics and tnedieal science. These products and science
require free form or synthetic curves and surtilees. The synthetie curves design is necessary on the
following situations.

a) when a curve is represented by a collection oftneasured data points, and


b) when an existing curve needs to be modified to nmeet new requiretnenty of design,

In the second case, the designer would require to represent a eutxe which is directly related to
data points. Also, the curve is flexible enough to bend, twist or change the curse shape by
changing one or more data points. Here, data points are usually called control Pints. Any curve is
specified by these control points which indientes the genebll shape ot' the curve. The curve itself is
called interpolant if it passes through all data points, The curve IS defined, modified and
manipulated with operations on the control points.

2.1.3. Order of Continuity


In practice, a complete curve is onen made up of segnnents. So, it is ilnpottant to Understand
how individual segments can be connected. There are two types Ots curve continuities: geometric
and paranwlric.
Aided Design and Manufacturin
Computer
2.4

Centers

(c) Second-order continuit)'


(C cun,'e)
Figure 2.1 Various order ofcontinuity

The synthetic or free form curves are required to pass through given data points Therefore,
polynomials are the typical form Of these curves. To ensure a smooth transition from one section
of synthetic or free form curve to the next, various continuity conditi0nS are imposed at control

points. The order of continuity is very impofiant when a complex modeled by joining several
curve segments. Zero order continuity (d) means simply that the curves meet. First order
continuity means that the first parametric derivatives Of the
Geometric
Modo/ing

coordinate functions for two succcssivc curve sections are cqual at their joining points. second
order continuity (C) refcrs that both first und second paralnctric dcrivatives of two
sections arc the same at the intersection. Therefore, first and sccond ordcr continuitics imply
slope and curvature continuous curves respectively. A first order continuity is thc minimum
acceptable curve for engineering design.

201.4. Interpolation and Approximation Modeling


There are two possible approaches available for modeling of synthetic curves such as (i)
Interpolation and (ii) Approximation. When polynomial sections are fitted so that the curve
passes through each control point, then the resulting curve is said to interpolate the set of control
points. Therefore, the interpolation essentially tries to pass a curve on a surface called interpolent
through all these points shown in Figure 2.2 (a). On the other hand, when the polynomials are
fitted to the general control-point path without necessarily passing through any control points
then the resulting curve is said to approxinuzte the set of control points. Therefore, an
approximation tries to fit a smooth curve on the surface which may be closer to three points but it
may not actually pass through each of them shown in Figure 2.2

(a) Interpolation curve (b) Approxintation curve

Figure 2.2 Various order ofcontinuity

One of the popular methods of interpolation is to use Lagrangian polynomial which is the
unique polynomial degree of n passing through n+l points. But, it is unsuitable in modeling the
curves because they tend to oscillate about control points, they are COmPUtationally
inconvenient and they are uneconomical of storing curve in the computer. A CUbiCPOIynomial
is the minimutn-order polynomial that can guarantee the generation of these curves. In addition,
the cubic polynomial is the lowest-degree polynomial that permits the inflection within a curve
segment and it allows the representation of non-planar threcdimensional curves in space. The
various forms of synthctic curves arc explained in detail in the following scctions.
Aided Design and Manufacturin
2.6 Compu ter

2.2. HERMITE CURVE


Hermite curve is a type of cubic spline described by French mathematician Herniite.
Generally, splines are functions which are used to fit a curve through a number of data points.
Spline is a flexible strip which is used to produce a smooth curve through a designated set of data
points. In general, the mathematical spline is a piecewise polynomial degree of K with continuity
of derivates of order (K—l) at common joints between segments Thus, the cubic spline has
the second order (C) continuity at joints. The cubic spline curve connects two data points and it
utilizes a cubic equation. Therefore, four conditions are required to determine the coefficients of
the equation.

The equation for a single parametric cubic spline segment is given by


4
POI) = E Pi

where u is the parameter and Pi are the polynomial coefficients.

In an expanded vector form, the equation (2.1) can be written as

P(u) = axu3 + bxu2 + cxu + dx

where x component of P is x(u) = axu 3 + bxu2 + cxu + dx and similarly, for the y and z
coordinates.

Therefore, the equations in scalar form are written as x(u) = axu3 +

bxu2 + cxu + dr y(u) = ayu3 + byu2 + Cyu + dy z(u) = azu3

+ bzu2 + czu + dz

For each of these three equations, the values of four coefficients a, b, c, and d need to be
determined in the polynomial representation for each of n curve sections between n control
points. It can be done by setting enough boundary conditions at joints between curve sections so
that the numerical values for all coefficients can be obtained.
The Hermiteform of a cubic spline is obtained by defining positions and tangent vectors at
control points. Hermite splines can be locally adjusted because each curve section is only
dependent on its endpoint constraints. As stated earlier, there are four conditions required to
determine the coefficients of the cubic curve equation. A Hermite cubic results when these

coefficients are the positions of two end points and the two tangent vectors at
Modeling 2.7
Geometric
Thcrcfore, thc Hcrmite cubic splinc is considered as one form of the general parametric

cubic spline.

If p(u) represents a parametric cubic point function for the curve section bctwccn end
points pn and pn+l, then the boundary conditions that define this Hermite curve section are

whcrc P',j and P',t+l arc the parametric derivatives (slope of the curve) at end
points Pn and Pn+l respectively.

Thc equation (2.2) can also be written in a matrix form as follows.

(2.3)

and the derivative of thin point function can be expressed as

P(u) = [3u2 1 0] . (2.4)


Substituting endpoint values O and I for parameter u in previous two equations, the
Hemite boundary conditions described earlier can be expressed in the matrix form as
follows.

OOla
1 1

010•c
3210d
Aided Design and Manufacturin
Solving this equation for the polynomial coefficients,

Manufacturing
2.8 Computer Aided Design and

-9 1

-3

3 -2

o 0

where Mil is the Hermite matrix= (2.5)

It is the inverse of the boundary constraint matrix. Therefore, equation (2.3) can be written in
terms of the boundary conditions as

(2.6)

The expressions for the Hermite blending functions can be obtained by carrying out the
matrix manipulation of above equation (2.6) and collecting the coefficients for the boundary
constraints. It yields the polynomial equation for a single cubic spline segment as

P(u) = Pn (2u3 — 3u2 + l) + Pn+l (—2u3 + 3u2) + P'n (u3 — 2u2 + u)

+ P'n+l (u —u ) (2.7)
Geometric
o
HO (u) + Pn+l HI (u) +P'nH2 (u) + H3 (u)
where P,t, P„+l, P'n, P'n+l are called geonzetric coefficients. The polynomials Hn (u) forn
= 0, l, 2, 3 are referred as blending functions because they blend the boundary constraint values
(endpoint coordinates and slopes) to obtain each coordinate position along the -curve'

The tangent vector becomes

P = Pn (6u2 — 6u) + PJI+I (—6112 + 611) + P 'n (3112 —411 + l)

Modeling 2.9
+ (3u2 — 2u)
OsuSl (2.8)
In matrix form, equation (2.8) can be written as

= [u3 u2 (2.9)

where [MH]u ¯ (2.10)

Figure 2.3 Cubic spline

Equation (2.5) is for a single cubic spline segment which passes through end points u = 0 and
u = l. It also shows that the curve's shape can be controlled by changing its end points or its
tangent vectors. The equation (2.5) can be generalised for any two adjacent spline segments of a
spline curve which are to fit a given number of control points. Figure 2.3 shows a cubic spline
connecting four points.
Aided Design and Manufacturin
Hemite polynomials can be useful for some digitizing applications where it may not be too
difficult to specify or approximate the curve slopes.

Solved Problems
2.
2.1. on Hermlte Curve
Problem 2.1

Determine the parametric equation for a cubic spline curve if (i) PO= PI and P', and
(ii) PO = PI and P'] P %
2.1 Manufacturing
Computer Aided Design and
0
O Solution: 2

The generalised parametric equation for cubic spline is


P(u) = Pn (2u3 — 3u2 + l) + PHI (—2u3 + 3112) + P tn (u3 — 2u2 + P '+1 (213
Here, the range is from 0 to 1.
Substituting n = 0, again the equation can be written as
P(u) = PO (2u3 - + 1) + PI (-2113 + 3u2) + P'O (u3 - 2u2 + PI (u3
Case (i):
Substituting these values PO = PI and Pfi = P'o in above equation,

P(u) = PO (2113 - + 1) + (-2u3 + 3u2) + P'o (u3 - 2u2 + P'O (u3


P(u) = PO (2u — 3u + I—2u + 3u ) + P '0 (u — 211 + u + u — u )
3 2 3 2 3 2 3 2

= (2u3 - + u)
P(u) = PO + (2u3 - 3u2 + u) Ans.
Case (ii):
Substituting these values PO = PI and Pfi = — P '0 in the same equation,
P(u) = PO (2u3 — 3112 + l) + PO (—2u3 + 3112) + P 'o (u3 — 2u2 + u) — PPO (u3 — 112)

= PO (2u3 — 3u2 + 1—2u3 + 3u2) + P 'o (u3 — 2u2 + tl—u3 + 112)

Ans.

Problem 2.2

Plot the Hermit cubic curve having end points PO (1, 3) and PI (7, 2). The tangent
vector for end PO is defined by a line joining PO and another point P2 (10, 8) whereas the
tangent vector for end PI is defined by a line joining PI and another point P3 (6' 0)• Also
plot the curve if the point P3 is changed to (9, 6) with the other things remaining the same'
Also solve the given problem to find the value at the midpoint of a Hermit curve using
Hermit matrix ntethod.
Given data:

-2
Geometric
Alodet:ng

= 075-=3.38

23. BEZIER CURVE


In the previous section, cubic splines which am based on interpolation techniques have
been described. Curves developed by this technique pass through the number of given data
points. As already stated in the previous section, there is another alternative for creating
the free-form cun'es which utilizes the approximation technique. Curves resulting from
approximation techniques do not pass through given data points. Instead, these points are
used to control the shape of resulting curves.
In most of the cases, approximation techniques are preferred over interpolation technique in
curve design due to added flexibility, ease of deployment and additional spontaneous feed
provided by this technique. Bezier and B-spline curves are created on the basts of approximation
techniques.

Bezier curve was developed by Pierre Be:ier at French ear company "Renault
Automobile Company". He used these curves to design automobile bodies. Bezier curve
have a number of properties which make them highly useftil and convenient for curve and
surface
A Bezier curve provides the reasonable design flexibility and avoids large number of
calculation. They are also easy to implement. For these reasons, Bezier curves are widely
available in various CAD systems. Most graphics software includes a pen tool for drawing paths
with Bezier curves.
Geometric Modeling

2.3.1. Mathematical Formulation of Bezier curves


Bezier uses a control polygon for curves in place of points and tangent vectors as in the case
Of cubic splines. The Bezier curve is defined in terms Ots locations with n+l points which are
called control points. These control points form vertices of a control polygon
2.16 Computer Aided Design and Manufacturing

which uniquely defines the curves shape. Bezier curve section can be fitted to any number of
control points. The number of control points to be approximated and their relative position
determine the degree of the Bezier polynomial.

Figure 2.6 shows a Bezier curve which has four control points (PI, P2, P3 and po Dashed
lines connect the control point positions which fonns the characteristics polygon, Only, first and
last control points or vertices of the characteristics polygon actually lie on the curve. The other
two vertices define the order derivates and shape of the curve. The curve is always tangent to first
and last polygon segments. Examples of two-dimensional Bezier curves generated from three,
four, and five control points are shown in Figure 2.7.

Figure 2.6 Cubic Bezier curve

PI
(b)

PI

(c) (d)

po

Figure 2.7 Two-dimensional Bezier curves

Mathematically, a parametric Bezier curve for n+l control points is defined by

(2.15)
1-0 where P(u) is any point on the curve and Pi is a control point which
describes the path of an aPproximating Bezier polynomial function between PO and Pn. B, n (u)
are the Bezier blending functions, called Bernstein polynonlials. Thus, Bezier curves have a
Bernstein basis.

ms Bemstein basis or blending function is given by

(u) = n qtl l (l . . . (2.16)


Computer Aided Design and Manufacturing
2.18

where nCl is the binomial coefficients which is given by

n!
Geometric Modeling

. (2.17) i!(n—i)!

The equation (2.12) can be expressed with the recursive calculation as follows with B(i
and Bo.i = (l —

Bi,n (u) = (l - (u) + u (u) . (2.18)


By using equations (2.16) and (2.17) and observing that = 'ICJ = l, equation (2.15) can be

expanded as follows.

P(u) = PO 'Ico(l + PI nq u (l - + P2nc2 (1 - +


+ n
cn.l (l -u) +Pn cnu"
n

The above equation can be simplified into


n

P(u) =EPi qui (I-ton (2.20)

2.3.2. Cubic Bezier Curves


Many graphics packages provide only cubic spline functions. It gives a reasonable design
flexibility while avoiding the increased calculations needed with higher-order polynomials. Cubic
Bezier curve are generated with four control points. The four blending functions for cubic Bezier
curve obtained by substituting n = 3 into equation (2.16) are

Bl,3 (u) =

The fonn of the blending functions determine how the control points influence the shape of
the curve for values of parameter u over the range from 0 to l. At u = 0, the only non-zero
blending function is Bo, 3 which has the value l, At u = l, the only non-zero blending function is
B3, 3 with a value of I qt that point. Thus, the cubic Bezier curve will always,paSS through the
control points PO and P3.

At the end positions of the cubic Bezier curve, the parametric first derivatives (slopes)
arc
P'(O) = 3(Pl -PO),
P'(l) = 3(P3 - P2) and the parametric

second derivatives are


P" (0) = 2Pl + P), P" (1) = 6(Pl - 21>2 + B)
By expanding the polynomial expressions for the blending functions, the cubic Bezier point
function in the matrix form can be written as

. . . (2.21) where MBez is the Bezier matrix which is given

by

23.3. Characteristics of the Bezier Curves


l. A Bezier curve is defined on n + I points PO, ..., Pn and is represented as a parametric
polynomial curve of degree n.
Bezier curve always passes through the first and last control points i.e. it passes through Bo
and if we substitute u = 0 and I in equation (2.19).
Bezier curve is tangent to the first and last segments of the characteristic polygon.
The curve generally follows the shape of the characteristic polygon.

The degree of the polynomial defining the curve segment is one less that the number defines
the polygon points. Therefore, for 4 control points, the degree of the polynomial is three, i.e.
cubic polynomial,

Bezier CUIves exhibit a symmctry property. The curve is symmetric with respect to u and
(1<1). Therefore, thc sequence of control points defining the curve can be reversed without
change of the curvc shape.
2.20 Co mputerAided Design and Manufacturing

7. Each control point is weighted by its blending function for each u value.
8. The curve shape can be modified either by changing one or more vertices of
polygon or keeping the polygon fixed and specifying multiple coincident points
vertex.
9. A closed Bezier curve can simply be generated by closing its characteristic
polygon or choosing Bo and Bn to be coincident.
Geometric Modeling

10. The curve lies entirely within the convcx hull formed by four control points.
I l . The curve is Invariant under an affine tnnsformation but thcy are not invariant under
projectivc transformations.
12. The curve exhibits thc variation diminishing propcrty. It means that the curve does not
oscillatc about any straight line more often which defines the polygon.

2.3.4. Difference between Cubic Spline and Bezier curves


The major differences between cubic spline and Bezier curves are as follows.

Bezier curve Cubic spline curve

1. The shape of Bezier curve is First order derivatives are used in


controlled by its defining points only. the curve development.

2. These curves pass through the


The curve does not pass through the given data points exactly.
given data points. Instead, these
points are used to control the shape of
the resulting curves.

3. Bezier curve permits higher-order The order or the degree of cubic


continuity as the degree or order of spline is fixed one. It is always
cubic for a spline segment.
Bezier curve is variable and it is
depending on the number of defining
data points. For example, n + I

points define n degree curve.


4. It is not much smoother as Bezier
The shape of the Bezier curve is
curve.
smoother than the cubic spline curve
because of its higher-order
continuity.

2.3.5. Solved Problems on Bezier


Curves
Problem2.3
plot the Bezier cun'e having endpoints PO (1, 3) and P3 (7, 2). The other control
points are PI (5, 6) and P2 (6, 0). Plot for values for u = 0, 0.1, 0.2 1 if the characteristics
polygon is drawn in the sequence PO — PI — PE P3. Also solve the given problem using
Bcier mafrix tofind the midpoint on the Bezier curve.
Given data:

In this case, n =3

9 Solution:
Case (i):

From equation (2.20), the simplified form of parametric equation of Bezier curve is

givenby P(u) qui (l -u)


i

For, n =3, the above equation can be written as


3

qui (l- )
so, the parametric equation for Bezier curve can be expanded as
P(u) = po.3co.u0(1 -u)3 + Pl.3Cl.ul (l 1 + P2.3C2.u2 (l - 2+ P3.3C3.u
From equation (2.17),

n!

= 3 and -l
P(u) = PO (l -u)3 + Plx3xu (l - + P2x3xu2 (1 3
- + 3P2u2 (l - u) + P) u3

2.22 Computer Aided Design and Manufacturing

x coordinate values are calculated by


Px(u) (l -u)3 + (l - + (1 -u) + Px3 u
Substituting ofPxo = l, PX! = 5, Px2 = 6 and Px3 = 7 in equation
(2.22), - -u)3 + 3x5xu (1 - + (1 -
- -3U+3U2- t?) + 15u (l u)2+ 18u2 (1 - + 7u
¯ (l —311+3112— 113) + 1511 (1+ t12— 2u) + 1 8112 (l — u) + 7213

= I —3t1+3t1 - + 1511+ -+ = -- 18u3+15u3- +


7213+3112- 30112+ 18u2-3u+ 15u +1
= 3u3— 9u2+ 12u +1
Similarly, y coordinate values are calculated by
(2.22)
Geometric Modeling

Py(u) = (1 -u)3 + 3P„ltl (1 + (1 - u

... (2.23)
Substituting of = 3, Pyl = 6, Pv2 = 0 and Py3 = 2 in equation (2.23),

- 3x(1 -u)3 + 3x6xu (1 - + 3xoxu2 (1 — u) + 2xu

- -u)3 + 18u (l — 102 +2u3


¯ —3U+3U2— t?) + 18u (1+ u2— 211) +2113
— 3 —9u+9u2— 3u3 + 18u + 18t13— 36U2+2tl

3113 + 18U3+2U3 +9U2— 36112—911+ 1811 +3 = 17113— 27u2+ 9u +3

PI(5, 6)

P3(7, 2)

Figure 2.8 A plot between u(x) and u(y)


Geometric

Modeling 2.23
Table 2.3 Values ofu(x) and u(y)

Case (ii) Bezier matrix ntethod:

From equation (2.21),

Bez •

where MBez is the Bezier matrix which is given as

-l 3 -3
3 —6 3

—3 3 0 0

1 o o o
—I

-6 3
-3
1

For x values,

-l 3 -3
3 —6 3
Px(u) = [113 112 u l] •—3 3

I o o
Substituting of Pao = 7and u = 0.5
3 -3
-6 3 3 oo o
Px(O.5) —3

2.24
- Computer

Aided Design and Manufacturing


- [0.53 0.52 0.5 1]

= [0.53 0.52 0.5 1]5.125 0.5x12+1x1=

Similarly, for y values,

Py(u) = [u3 2
and

[0.5

Substituting of PVO —

Py(0.5) = [0.53
- [0.5 0.5x9+1x3 = 2.87

Plot the Bezier curve having end points PO (2, 2) and P3 (15, 3). The other control
points are PI (6, 8) and P2 (12, 10). Tabulate the valuesfor seven points on the Bezier
curve
tric Modeling

= --3tC+3U

Table 2.5 J 'alues

The graph
through it.

24. B.SPLINE CURVE


The Bezier curve developed on the basis of Bernstein bnsi* the

which defines the curve. The only way to reduce the the
number of vertices and vice versa.

2. Bezier curve is considervd as n single curve controlled by 011 control point\i, of this, with
an increase in the nutnber Ots contml points, the order oc polynotniiit representing the curve
incteasess It inetvases the cotuplexi(y ol' calculation.

3. A change in one vertex is felt thtoughout the entilV' curve because


Of the Bemstein basis. It Ineons that the value of blending filtletion id "Il

parametric values over the entire curve.

B-Spline curves provide another elTeetive nwthod ol' generating CIII'VCN defined by
polygons. In fact, B-spline curves are the tuost widely used class
Moreover, it is a proper and powerful geneuition o? Bezier curves,
Bernstein basis as a special ease. Bespline basis is generally non gtobnl, The non behaviour of B-
spline curves is due to the (net thnt each vertex is ussocilt(ed with oniqu€'
function. The B-spline exhibits loeul control over the order Ots the l)ANih
Therefore, whenever a single vertex is moved, only those vertices will be while the rest
remains the same, The degree of the curves be changed without changing the number of defining
polygon vertices, B-spline hilV0 t11C ol)ility to Interpolate or approximate o set of given points.
2.3 Computer Aided Design and
0
Manufacturing

Let P(u) be the position vectors along the curve as a function of the parameter u.
Then, a B-Spline curve is given by

0 u umar

where the Pi are an input set of n + I control points and Bi,k (u) are the normalized B.
spline basis functions.

There are two major differences between equation (2.6) and equation (2.28).

1. The parameter k control the degree (k—l) of the resulting B-spline curve
and it is usually independent of the number of control points. The
parameter k can be chosen to be any integer value in the range from 2 up
to the number of control points, n + l.
2. The range of parameter u now depends on how we choose the B-spline
parameters. The maximum limit of the paramctcr u is no longer unity as it
was so chosen arbitrarily for Bezier curves.

3. Local control for B-splines is achieved by defining the blending functions


over subintervals of the total range of u.

For i normalized B-spline basis function of order k (degree k—l), the basis functions

are defined by Cox-DeBoor recursionformula.

Bi,k (u) Bi+l,k-l (u)

where Bi,l (u) = l, if


ili S u o, otherwise
where each blending function is defined over k subintervals of the total range Of ti•
The selected set of subinterval endpoints u -is referred as a knot vector. The values Of are
elements of knot vector satisfying the relation iti+l. The parameters varies from to
along the curve P(u). Values for umi,j and u,mr then depend on the number Of control
points we select the value, ye choose for parameter k and how we set up the subintervals
(knot vector).
The B-spline functions have the following properties.
Modeling 2.31
Geometric

l. Partition ofunity:

(u) = I . This property ensures that the relationship between the curve and its

defining control points is invariant under after transformations.

2, Positivity:

Bi,k (u) 0. This property guarantees that thc curvc scgmcnt lies completely within the convex
hull ofPi. 3. Local support:

Bi.k (u) = 0 if u [tii, 1/01-+1]. This property indicates that each control point affects only k curve
segments.

4. Continuity:

The polynomial curve has degree k—l and d-2 continuity over the range of u. Therefore, Bi,k
(u) is (k—2) times continuously differentiable.

5. Forn + I control points, the curve is described with n + I blending functions.


6. The range of parameter u is divided into n + k subintervals by n + k + I values specified in the
knot vector.

7. Each section of the spline curve (between two successive knot values) is influenced by k
control points.
8. Any one control point can affect the shape of at most k curve sections.

Formally, B-spline curve is defined as a polynomial spline function of order k (degree k-l)
since it satisfies the following two conditions.

(i) The function P(u) is a polynomial of degree k—l an each interval u Stii+l
(ii) P(u) and .its derivatives of order 1,2, k—2 are all continuous over the entire curve.

204.1. Characteristics of the B-spline curves


1• The local control of the curve can be obtained by changing the position of a control point
or using multiple control points by placing several points at the same location. It can
also be obtained by choosing a different degree (k—l). Figure 2..11 illustrates
the local control of a cubic B-splinc curve by moving the control points.
2.32 Computer Aided Design and Manufacturing

2. The B-spline curves do not pass through the first and last cont-ol points except when the
linear blending functions are used.

(a) Before modification (b) After modification

Figure 2.11 Local control ofB-spline curves

3. B-splines allow to vary the number of control points used to design a curve without
changing the degree of the polynomial. Also, any number of control points can be
added or modified to manipulate curve shapes.
po

Figure 2.12 Effect ofthe degree ofB-spline curves on its shape

4. A non-periodic B-spline curve pass through the first and last control points and it is
tangent to the first and last segments of the control polygon shown in Figure I

5. As number of degree of curve increases, the curve tightens show,-n in Figure 2.12 if the
degee of curve is less the control points '*ill be closer. k = l, a zcro degree curve results and
the curve then becomes the control points themselves.

6. A second-degree curve (k = 3) is always tangent to the midpoints of all internal polygon


segnents. This condition is not suitable for other degrees.
The B-spline curve becomes a Bezier curve if k equals the number of control points (HI) shown
in Figure 2.13. In this case, the range of u becomes zero to one.
p,

PO

p,

Figure 2.13
8. Multiple control points results the regions of high curvature of a B-spline curve. Figure 2.14
shows this property of the curve.
9. As the dcgrcc of curve increases, it will be more difficult to control and calculate accurately.
Thus, a cubic B-spline curve is sufficient for many applications.

pa

Figure 2.14 Multiple controlpoints B-spline curve


2.34 ComputerAided Design and
Manufacturing

2.4.2. Uniform and Non-uniform B-spline Curves


When the spacing between knot values is constant, the resulting curve is called
uniform B-spline. For example, a uniform knot vector is set up by

{-1.0, -0.5, 0.0, 0.5, 1.0, 1.5}

Often knot values are normalized to the range between 0 and l, as in


{0.0, 0.25, 0.5, 0.75, 1.0}

It is convcnicnt in many applications to sct up uniform knot values with a separation


ofl and a starting value of 0. The following knot vector is an example of this specification
scheme.

Uniform B-splines have periodic blending functions. So, for given values of n and k,
all blending functions have the same shape. Each successive blending function is simply a
shifted vcrsion of the previous function.

Bi,k (u) = (u + du) = (u + 2Au) wherc Au is

the interval bctween adjacent knot values.


For non-uniform B-spline, the spacing bctwccn knot values is not constant and
hence, any values and intervals can be specified for the knot vector. Multiple internal
knot values and unequal spacing can be chosen between knot values. For example, a non-
uniform knot vector can be set up as

{0, 0.25, 0.4, 0.5, 0.8, 1.0}

Non-uniform B-splines provide the increased flexibility in controlling a curve With


unequally spaced intervals in the knot vector,. different shapes are obtained for blending
functions in different intervals which can be used to adjust spline shapes• increasing the
knot multiplicity, slight variations are produced in the curve shape and discontinuities
are introduced. Multiple knot values also reduce the continuity by I for repeat of a
panicular value,

Open and Closed B-spline Curves unitörtn B-spline curve is a cross between
uniform B-splines and non-uniform B Sometimes, it is treated as a special type of uniform
B-spline and sometimes, it is to be the non-uniform B-spline. For the open
uniform B-splines or simply open Bthe kmot spacing is uniform except at ends where knot
values are repeated k times,

following are two examples of open uniform, integer knot vectors and each with a
e:tiag value of 0,

for k = 2 and n = 3
for k = 4 and n = 4
These Imot vectors can be normalized to the unit interval from 0 to l,
{0, o, 0.25, 0.5, 0.75, 0.75, for k = 2 and n = 3

{0, o, o, o, 0.5, 1, 1, 1, for k=4 and n = 4


Fotany values of parameters k and n, an open uniform knot vector can be generated
with z:æervalues using the calculations
0, for0 j < k
— j —k
+1, fork <
j 'n n —k
+2, forj > n
for ofj ranging from 0 to n + k and the range of u is given by
OSuSn—k+2
With this assignment, the first k knots are assigned the value of 0 and the last k knots the
value n — k + 2. The above equations determine the knots and spacing between them open B-
spline curve.

Open uniform B-spline curves have similar characteristics as Bezier curves. When I (degree
of the polynomial is n), open B-splines are reduced to Bezier splines and all Laot values
are either 0 or l .

Polynomial curve for an open B-spline passes through the first and last
control Also, the slope of the parametric curves at the first control point IS
parallel to the line
the first two control points. Similarly, the parametric slope at the last control point Parallel to
the line connecting the last two control points. Thus, geometric constraints for Oktclung curve
sections are the same as for Bezier curves.
2.36 Computer Aided Design and
Manufacturing

The difference between open and closed B-spline curves is in the choice of the knots
and the basis functions. Closed B-spline curve utilizes the periodic B-spline fimctions• as
their basis functions with knots at the integer. These basis functions are cyclic interprets
of a single canonical function with an interval of k for support.

The closed B-spline curve of degree (k -- l) or order k defined by (n + l) control


points is given by equation (2.28) as the open curve. For closed B-spline curves
equation* b-spline mction is given by
Bi,k (u) = Bo k ( (u —i + n + l) mod (n +
l)) where uj=j, 0 S j S n + I and the
range of u is

0 S us n + 1
The mod (n + l) in the above equation is the modulo function which is defined as

Amodn= 0, reminder ofA / n, A > n


The properties of open curve such as partition of unity, positively, .local support
and continuity are also applicable to closed curves. Similarly, closed curve also have the
same characteristics as open curve except that they do not pass through the first and
last control points. Therefore, the curves are not tangents to the first and last segments
of the control polygon. Closed curves are represented by closed polygons where the
first and last control points are connected by a polygon segment.

pod
Figure 2.15 Closed B-spline curve
Geometiic Modeling

Pefbdic splincs are particularly useful for generating certain closed

—plc;the closed curve as shown in Figure 2.15 can be generated in sections

by $Cifying four of thc six control points shown at each step. If any thtve

consecutive points are identical, the curve passes through the same coordinate

positions

L4.4. Cubic B-spline Curves cubic periodic B-spline curves are cotumonly used in CAD
packages. eut»es, and each blending function span four subintervals of the total range
of u: If we are to tit the cubic to four control points, then we eould use the integer knot
vector and vessunvnee discussed earlier to obtain the periodic blending functions,

The characteristic matrix can be easily obtained by starting with the boundary
eondttions and they attain the blending functions normalized to the interval 0 S u S l, The
boundary conditions for periodic cubic B-splines with four conseeutive eontml points,
labeled andP3, are
1

61
6
1

2
1
2
These boundary conditions are similar to cardinal spliness

A matrix formulation for a cubic periodie B.spline with tiDut• eontNl points eau
written as

where MB is the B-spliue matrix which is given as

3
-6 MB =
4
2.38 ComputerAided Design and
Manufacturing

This matrix can be obtained by solving for the coefficients in a general cubic
polynomial expression using thc specified four boundary conditions. The cubic B-spline
curve defined by four control points is identical to the cubic Bezier curve defined by the
same points.

2.5. RATIONAL CURVES


Rational cutves were first introduced for the computer graphics by Coons. Rational
curve is defined as the ratio of two polynomials whereas a non-rational curve is defined by
one polynomial. Various rational curves such as, rational Bezier curves, rational B-spline
and ß-spline curves, rational conic sections and rational cubics have been formulated. The
most widely used rational curves are Non-Uniform Rational B-Splines (NURBS).
NURBS is capable of representing in a single form non-rational B-splines and Bezier
curves as well as linear and quadratic analytic curves. Rational B-splines provide a single
precise mathematical form capable of representing the common analytical shapes such as
lines, planes, conic curves including circles, free form curves, quadric and sculptured
surfaces etc.
Rational polynomials are functions in which one polynomial curve is divided by
another polynomial curve. In particular, they make use of homogeneous coordinates in
which three dimensional points of the form [x y z] T are mapped to four dimensions with an
additional coordinate dimension w using the form [xw yw zw] where w > 0. The tenn w is
a weighing or scale factor. The rational form of the polynomials is obtained by using
homogeneous coordinates in the polynomial expressions and then dividing xw, yw, zw
coordinates of each point by their homogeneous weighing coordinates.

A rational B-spline curve defined by n+l control points pi is given by

E pi Bi,k (u) 0 u unut


where Pi are a set of n + I control points (defining polygon vertices) for the rational
B' spline curve. Bi,k (u) is the rational B-spline basis function and it is given by

(Il)
Bi,k (u) =

The above equations (2.31) and (2.32) show that the rational B-spline basis functi0nS
and curves are a generalization of non-rational B-spline basis functions. If we substitute I
in
(2.32), Bi,k (u) = Ri,k (u). The rational basis function has nearly all analytic
•metric characteristics of their non rational B-spline countel•parts. In particular,

I Each rational basis function is positive or zero for all parameter values i.e., Bi,k 2 0

2. The sum of the rational B-spline basis functions for any parameter value u is one,

i.e. ± Bi,k (u ) =- l

3. Except for k = I, each rational basis function has precisely one maximum.
4. A rational B-spline curve of order k (degree k—l) is d-2 continuous everywhere.

5. The maximum order of the rational B-spline curve is equal to the number of defining polygon
vertices.
Rational splines have the following two important advantages compared to non-rational

l. Rational splines provide an exact representation for quadric curves (conics) such as circles and ellipses.
Non-rational splines which are polynomials can only approximate conics. It allows graphics packages
to model all curve shapes with one representation rational splines without needing a library of curve
functions to handle different design shapes.

2. Rational splines are invariant with respect to a perspective viewing transformation. It means, we can
apply a perspective viewing transformation to control points of the rational curve and we will obtain the
correct view of the curve. Non-rational splines, on the other hand, are not invariant with respect to a
perspective viewing tansfomation.

TO Plot conic sections with NURBS, quadratic spline function (k = 3) and three control used. It is done
with a B-spline function defined with the open knot vector.

IS the same as a quadratic Bezier spline. Then, the weighting functions are set to the Ing values.

WoZW2= l and

I—r'
2.40 Computer Aided Design and

Manufactåring

and the rational B-spline representation is given by

(2.33)

We then obtain the various conics shown in Figure 2.16 with the following values for
weighting factor r,
r > 1/2, WI > I (Hyperbola section)
WI = 1 (Parabola section)
WI < 1 (Ellipse section)
WI = 0 (Straight-line segment)

Hyperbola (r= 0.5, wt > 1)

=1)

Bezier
Given data:
PO [4 4 4] 8
61
= [10 3 4]

、、20 いⅲ盟い、ⅲれゞいⅲい d
いハ(のお、0 い れ)、い

い山いいⅵいい,y

いⅲ ⅲ い川いい、、、い ⅲ、、
い 0 い可、い朝

物←)いヾドいい朝いトヾ W ⅲ いい
0

山 0 ドいい、い 0 ぐ中はいいいい


いロ 、

へいドら、“、いーいロ、いれ
ド(2 い)、

へ レ ハ、
い の

の+盟'沖い のト盟'覗
( 2、34 )
SUI\Stitutingo ロおい一 0 いい d お、)ー 10 ⅲ 自ドい、3・l)、
のヨい"い い 1281080
0

4 い一朝いにい
いドー則,・い,ⅲ ロ盟ド

s 面面 riy い、以、0 い い、 い 0 u で 、い恤 ed い いトハ 0 いの'下盟い l(l の強盟い

S 山 0 ロ、、0 にドれい旧第 3 ⅲ い 35 ).

ト、ト(いのⅱドい
物町い朝う、ロ 0

2.4 Computer Aided Design and


2
、ルいⅲ 10u 101/ト(Ⅲ いい面
Manufacturing

Similarly, z coordinatc values arc calculated by

(l -u)2 + 2P:l u (l — u) + 2P:2112 (2.36)


Substituting of = 4, Pzl = 6 and = 4 in equation (2.36),
= 4x(l —u)2 + 2x6xU (l — u) +2x4xU
= 4(1 --2U+U2) + 12 (u — 112) + 8112

=4 + 1211 12t12 + 8u2 = 4 + 411

10

10 12 14 16 18 20
u(x)

Figure 2.17 A plot between u(x) and u(y)

Table 2.6 Values ofu(x) and u(y)

0.1 0.2 0. 0.4 0.5


0.6 0.7 0.8 0.9
3
20 u( 4 4. 5. 6. 7.5 10. 12. 14. 17.
x) 52 28 28 2• 72 68 88 32
u( 4 4. 5. 5. 6.2 6,5 6.6 6.6 6.5
6.35
y) 74 36 86 4 4 6 6
4 4.4 4.8 5.2 5.6

AU

6.4 6.8 7.2 7.6

Problem 2.2
A cubic Bezier curve is defined by coordinates,Po = [2 2 OJT, PI = [2 3 OJT, P2 [33 o]T
d P3 = [3 2 OJT. Find the equation offhe resulting Bezier curve. Also find
on

the curve for u = 0, 0.25, 0.5, 0.75 and 1. [May'18J


2.44 Co mputer Aided Design and
Manufacturing

Substituting of Pv = 2, Pyt = 3, Py = 3 and Pyr 2 in equation (2.38),


= -u)3 + 3x3xu (1 - +3x3xu2(1 - u) +
= 20 -3u+3u2- 213) + 9u (1 -2u+u2) + 9 (212 - 113) + 211
= 2 — 6U+6U2 — 2t13 + 9tI — 18tt2 + 9113 + 9 112 —9 113 + 2u3= 2 + 3u —
3112

P2 (2.5,2.75)
1.8 2.2 2.4 2.6 2.8 3.2

u(x)

Figure 2.18 Bezier curve

Table 2.7 Values ofu(x) and u(y)


0.25 0.5 0.75 1
2 2.16 2.5 2.84 3
2 2.56 2.75 2.56 2
2.7. SURFACE MODELING
Boundaries of the solid are defined by surfaces. Surfaces themselves are bounded by
curves. A surface is really just a set of related curves. A surface of an object is more
complete and less ambiguous representation than its wire frame model. It is an extension
Of a frainc model with additional information. A complex surface can be very difficult
to visualize

without a physical model and surface modeling using a computer eases this process
considerably. The basis of a surface is the definition of a curve in two dimensions in a
given plane. It can then be swept along another curve defined in another plane.
Modoling 2.45

surface modeling defines cotilponent With gteater tnathetnntical integrity as it Inodels surfaces to

givc more definitive spatial boundarics to the design. It is particularly useftll niodcling objects which can

be ntodeled as shells such as car body panels, aitvraft or fan blades. The surface takcs the Inodeling of

object one step bcyond wire frame model by providing infonnation on surfaces connecting the

object edges. surface modeling can be used for calculating Inass propcrties, interfet•ence between parts,

gcn«ating cross-sectioned views, genetllting tinite eletncnt Illesh and generating NC tool for continuous

path machining. Databases of surface 1110dels are centralized and


Manipulation of surface entities in one view is autotnatically retlected in Other Surface
models can be shadcd and represented With hidden lines.

Surface crcation on a CAD systetll usually requires wire entities such as lines, cun•cs, points, ctc. All
analytical and synthctic cutves can be used to generate surfaces. ln ordcr to visualize surfaces on a graphic
display, {1 tnesh, say m x n in size is usually displaycd. Thc mesh size is controlled by the user. Most CAD
systetns provide options to set the mcsh size.

2.7.1. Types of Surfaces


Thc surfaces gcnerated by the surface 1110deling are classified as follows.

(a) Flat surface - 1110St basic feature of surface 1110del.


(b) Sculplured surthces - based on flat face mostly used in FE analysis.
(c) Sculptured surfaces based on patches.

(d) Analytical surfaces (very rarely used).

(e) Combination of the above types.

A simple and basic form of surface is flat surJàce. The tnost general and complex surface
representations are generally known as scillptured Silt•face,

Sculptured surface means the surface produced by conibining two families of curves intersect
onc another in a criss-cross Illanner and cteating network of inter connected Patches.

Common surface entitics used in a surface modeling are lis' foliows.

(a) Planc surface

(b) Ruled (Ioned) surface

(c) Surface of
2.46 Computer Aided Design and
revolution
Manufacturing

(d) Tabulated surface

(c) Bezier surface


(D B-spline surfacc
Coons patch
(h) Fillet surface
(i) Offset surface
Figure 2.19 Sculptured surface

(a) Plane surface:


The most elementary and simplest form of the surface types is the plane surface
which may be defined between two parallel straight lines through three points or
through a line and a point. Figure 2.20 shows an example of a plane.

Figure 2.20 Plane surfilce


(b) Ruled (lofted) surface:
A ruled surface is produced by linear interpolation between two different boundJ)
curves that define the surfaces shown in Figure 2.21. The effect is Of a surface generated
bY moving that straight line with its end points resting on edge curves. This type Of
surface more suitable for representing the surfaces which do not have any twists or
kink'S'

Boundary curve
Boundary curve Figure 2.21 Ruled

(lofted) surface

(c)Surface ofrevolution:
A surface of revolution can be generated by revolving a generating curve about a =line or
vector. This surface is particularly useful when modeling turned parts or parts eh possess the
axial symmetry.

Curve
line

Figure 2.22 Surface ofrepolution


(4 Tabulated surface:

IS a surface generated by translating a planar curve for a given distance along a direction.
The plane of the curve 'is perpendicular to the axis of the generated shown in Figure 2.23.

(c) Bi-linear surface:


This 3-D surface is generated by interpolation of four endpoints. Bi-linear
surfaces are very useful in finite element analysis. A mechanical structure is
discretizcd into elements which are generated by interpolating four node points to
form a 2-D solid clement.
and
Figurc 223 Tabulated surface

Figure 2.24 Bi-linear surface


(J) Bezier surface:

Figure 2.•25 mzier surface


2.50 Computer Aided Design and
Manufactunh9

A coons patch or surface is generated by the interpolation of four edge curves


shown Figure 2.27. The coons patch is used to create a surfacc using curves whiCh•
form closed boundaries.

(i) Fillet surface:


A fillet surface is analogous to the fillet arc in curve construction. It is defined
asa surface connecting two other surfaces in a smooth transition (generally of a
constant, smoothly changing, radius of curvature). It is a B-spline surface which
blends two surfaces together as shown in Figure 2.28.

Figure 2.28 Fillet surface


C) Offset surface:

Figure 2.29 Offset surface


Existing surfaces can be offset to create new ones identical in shape but they
different dimensions. So, •the new surface Will be created at a faster rate. For example'
create a holding cylinder, first inner or outer cylinder can be created using a
d. Based on this surface, other cylindrical surface can be created by using an offset It is
shown in Figure 2.29.

Applications of Surface modeling

surface modeling can be used generally to model exterior shell objects such as sheet and thin

moulded plastic parts. Other areas of applications of surface modeling $$ follows.

l, Body panels of passenger cars, structural components of aircraft and marine

structures.

2, plastic containers, telephones, impellers of pump and turbine, development of surface


for cutting shoe leather, glass marking etc.

17.3, Advantages and Disadvantages of Surface modeling


llvantages:

l. Unambiguities in the interpretation of object are less than wire frame models by using the
provision of hidden line removal.

2. Surface modeling can be used to pcrform interference checking (i.e. penetration of one part
with other).

Surface modeling can be used to check the aesthetic look of the product (By using

coloring and shade facilities).

4• As the surface models precisely define the part geometry such as surface and

boundaries, they can help to produce NC machine instructions automatically.

Complex surface features such as shoes, car panels, doors etc can be created very easily.

%antages:

Interpretation of surface model is still ambiguous.


2' Surface models require more computational time when compared to wire frame
models.

ore skill is required for surface modeling.


ass Properties such as weight, volume and moment of inertia cannot be derived m surface
models.
2.52 Computer Aided Design and
Manufacturing

5. Surface models cannot be used as a basis for finite element analysis for stress
strain prediction.
6. Neither hidden lines can be easily removed nor can internal sections be easily
displayed.

2.8. TECHNIQUES FOR SURFACE MODELING


Surface design may be treated as an extenSion of curve design in parametric
dimensions Therefore, various curve generation techniques discussed in the first part
of this chapter can all be applied in surface modeling. The implicit, explicit
and parametric forms of curves can be extended to surfaces.
In explicit form, a surface is represented by an equation of the form z =(r, y)
The implicit form of surface representation is.f(x, y, z) = O.
In parametric form a surface may be represented as

where X, Y and Z are suitable functions of two parameters u and v. For example,
the parametric representation of the surface of a sphere whose centre is. at the origin
Of coordinates and of radius R is

x = X (0, (P) = R sin (P


cos 0 y= Y (0, Q) = R sin (P
sin 0 z = Z (0, (P) = R cos
(P

surfaces may be defined in one of the following methods.

(a) In terms ofpoints of data (positions, tangents, nonnals)


(b) In terms of data on a number of space curves lying in these
surfaces•
The resulting surface will either interpolate or approximate the data. Surfaces
normally designed in patches in which each patch corresponds to a rectangular
domain in space.

Jn the design of curves, more imbdrttih'de is given to the generic (non-analyticol)


parametric representation of low degeee pOlynomial segments which can be compos
together to model a curve. The reasons are to

mcModeling

(i) include a variety of shapes that analytical curves fail to providc

(ii) get bcttcr local control of shape

(iii) get bcttcr smoothness and continuity in curvc design

(iv) evaluate derivatives easily (v) prevent excessive oscillations that may be observed in
highcr degree polynomial segments, and

(vi) make the representation frec from singularitics such as vcrtical slopcs.

Also, the parametric representation makcs casicr to compute the interscction points or phtcurves
easier which is not casy with implicit representations.

Once we have decidcd to use parametric polynomial curves, wc must choosc thc dcgrcc ofthe cune.
If wc choose a high degree, wc will havc many parameters which wc can sct to frmthe desired shape
but the evaluation of points on the curve will be costly. In addition, as of a polynomial curvc
bccomes higher, therc is more dangcr that thc curve will become rougher. On the other hand, if we
pick too low a dcgrcc, wc may not have cnough peters with which to work. However, if we design
each curve segment over a short itaval, we can achieve many of our purposes with low-degree curves.
Although thcrc may a few degrees of freedom, these few may be sufficient to allow us to produce the
Hedshape in a small region. For this reason, most designers work with cubic polynomial

u. SURFACE PATCH

Apatch is considered as the basic mathematical element to model a composite surface.


computer graphics, the parametric surfaces are sometimes called patches, curved surfaces, surfaces.
Some surfaces consist of a single patch while others may consist of few COnnected together. A
surface patch defined in terms of point data will usually be On a rectangular array Of data points.
These points may be regarded as defining a series in one parameter direction which in turn are
interpolated or approximated in the n Of the other parameter to generate the surface. Sinilar to
curves, cubic basis are a good compromise between. complexity and flexibility and they are most
used in computer graphics.

general cquation of thc surface pr fiV'rrace patch is given by

2.54 Computer Aided Design and

Manufacturing

where P is the position vector of a point on the surface. The natural form of the
_function f(x, y) for a surface to pass through all the given data points is a polynomial
given by

z E E aj,k xJyk (2.39) where the surface is described

by an NY grid of size (nt + 1) x (n + l) points.

A parametric surface is a surface and it can be parameterized by two variables,


u and v Parametric surfaces have a rectangular topology. In parametric
representation, three. dimensional curved surface in space is given by
[X(u, V) y(u, v) z(u, (2.40) il min

min mar where P(u, v) is the vector-valued function of two

parameters u and v. The function

v) at certain u and v values is the point on the surface at these values. Values of u
and v determine the position of a point on the surface and thus, u and v may be
regarded as the curvilinear or Gaussian coordinates.

Using equation (2.40), a general three-dimcnsional surface can be modeled by


dividing it into an assembly of patches. Figure 2.30 shows the parameter curves on a

surface patch defined by a rectangular array of

data points.
Figure 2.30 Surface patch

2.9.1. Analytical and Synthetic Surfaces


There are two types of surfaces such as analytical and synthetic surfaces.
Analytical surfaces are based on wireframe entities. They include plane surface, rules
surface, surface of revolution and tabulated cylinder. Synthetic• surfaces are formed
from a given set Of data points or curies. They include bicubic, Bezier, B-spline, and
Coons patches. Synthetic surfaces are generated by the following methods.
g*lin 2.55 g

(a) Tensor product method

(t) Rational method (c) Blending method tensor product method is the most popular and widely
used in surface modeling of its simple separable nature involving only polynomials. There are
no new complications due to the higher dimensionality of a surface over a curve.
the properties of tensor product surface can easily be deduced from properties of —ng curve
schemes.
(i) rational method develops rational surfaces which is an extension of rational

(i) fie blending method approximates a surface by piecewisc surfaces.

SURFACE
Afinrinterpolation between four bounded curves is used to generate a Coons surface Eisalso called
Coons patch. This type of surface is based on the pioneering work of EzÅnson Coons. The Coons
formulations interpolate to an infinite number of control @points to generate the surface and hence, it
may be referred as a form of transfinite
*ion. The generalized Coons surface (shown in Figure 2.31) is defined by four —at surface patches.
By changing the shape of constituents, the shape of the resulting
change as well even if
the boundary

2.56 Computer Aided

Consider a surface patch enclosed by four curves shown in Figure 2.31. Let u and
v be two parametcrs used to express this surface patch. It is assumed that u and v
tange from 0 to I along these boundaries and each pair of opposite boundary curves
arc identically parameterized. Let P(O,O), and P(l,l) be the position
vectors at the four comers, and they denote the four boundary cunes by P(u,0), P(u,
l), ,v) and

2.10.1. Bilinear Coons Surface


The linear Coons surface is the simplest of all Coons surface and it is a more general
Coons surface possible. Let us consider, the Coons patch which interpolates the four
boundary curves is shown in Figure 2.31. Consider the linear Coons surface patch being
obtained by simple summing up of two ruled surface obtained by using opposite boundary
curves as rails indeed.

P(u, v) = {P(u, 0) (1 - v) + (P(u, 1) v} + {PO, v) (1 - u) + (PO, v) u} (2.41)


If we substitute the boundary conditions in the above equation (2.41), we should get
the corner points and boundary curves from this parametric form.

If we substitute u = 0 and v = 0 in the above equation, Poo should be obtained by

but it is not. Also, at the edge u = 0

which is not P(O, v).

The result corresponds to the original data. It is because of the fact that the corner
points are counted twice as P(O,O) is contained in both P(u,O) and P(O, v) boundary curves•
The correct result is obtained by subtracting the excess contribution to the surface due to
duplication ofthc corner points. It yields the following equation,

P(u, v) = {P(u, 0) (1 -v) + (P(u, 1) v} + {P(O, v) (1 - u) + (PO, v) u}

- {PO, 0) - v)} - {PO, l)uv} (2.42)

deboundary shape of the surface.

By substituting the boundary conditions at the comer points and boundary


edges, we get

the original data.

At u = O and v - O, P POO , etc.


P(O,O)
(l — u), u, (l — v) and blendingfunctions because they blend curvcs to
produce the internal

The main drawback of this formulation is that it only provides co continuity bctwccn djcent
patches and not Cl continuity cvcn when the boundary curvcs providc thc Cl mtinuity. In order to
provide the Cl continuity, the linear functions (l — u) and u are replaced by the following cubic
Hermitc polynomials Fl(x) and F2(x) equations respectively

Fl(u) = I

2t1 +3112

210.2. Applications of Coons Surface


Coons surface is easy to create and therefore, many 2-D CAD packages utilize it for
generating models.
It has only a limited application since the surface is inflexible and it cannot create very
smooth surfaces.

would be very difficult to producc a smooth automobile fender using the Coons
surface.
Several CAD softwares including AutoCAD use this surface for generating surfaces
between 4-bounded cdges.

ill. BICUBlc SURFACE PATCH

bicubic patch or surface is generated by four boundary curves which are bicubic
polynomials. Bicubic parametric patches are defined over a rectangular
2.58 Computer Aided
domain in uv-space and the boundary curves of the patch are themselves cubic
polynomial curves. Hence, we call it as bicubic. The bicubic surfacc can be
It thought of as 4 curves along u parameter (or alternately as 4 curves along the v
parameter). To compute the location of the surface for some (u, v) pairs, each of
the 4 u-curves can be first solved for the specified value of u. Those 4 points now
make up a new curve which can be evaluated at v, Alternately, if we first solve
the 4 v-curves and to create a new curve which we then evaluate at u, we will
get the exact same answer.
Figure 2.32 Bicubic Surface patch
Analogous to a cubic curve, a parametric cubic surface can be defined by 16
points.
4 points for coordinates of the corner points
8 points for slopes in the u and v directions
•z 4 points for twist vectors (second derivatives)

Figure 2.33 Effect of lifting one ofthe control point ofbicubic surface
patch
tic 2.59

net of conti01 points for-ms a polyhedron in Cartesian


spacc and thc position of the this spacc control shape of
the surface. in
Example: The effect of lifting onc Of thc control points of

a bicubic Bczicr surface patch in Figure 2.33.

following are major types of parametric Bi-Cubic Surfaces


used in CAD:
Hcrmite surfaces
Bczicr surfaces
B-Splinc surfaces.

BICUBIC SURFACE

Hennite bicubic surface is one of the common types of


synthetic surfaces used in CAD
In mathematic terms, a Hermite bicubic parametric patch
can be expressed in terms ofåebasis function and the control
points.
3 3
E Pi,] uivj (2.43)

P33tl V + P32tl V2 + P31t13v + Boll) + P2Jt1V + P22t12v2 + P21t1 V + p:ou: +


P13tlV3 + P12tlV + + PIOII + + P02V2 + POIV+ Poo

u ti u I |
'*here 0 S u, v S t
(2.44)

matnx form, the above equation may be written in the forn of

v I and
2.64 Computer Aided
k
i
(0.5, 0.5) = 4.5313 2.5313 6.9375
3.3438 5.5313 5.4375

--24.6 i- 1 .4413j+ 16.59 k

2.13. BEZIER SURFACE


Just as parametric cubic curves are extended to parametric cubic patches, Bezier curves
may bc extended to Bezier surface patch. The Bezier surface is a type of parametric surface.
Bezier surface is a straightforward extension to Bezier curves. A Bezier patch is the surface
patch formed by sweeping each control point of a Bezier curve along a path which is itselfa
Bezier curve. Instead of the curve being parameterized by a single variable u, we use two
variables such as u and v. As there are four control points for a Bezier curve, the total of 16
control points is required for a single bi-cubic Bezier surface patch.

While the surface passes through the four corner points, the control points are controlled
all other points on the surface. Using the placement of these points to specify, edge slope is
easier than determining the parametric slopes and twist vectors for the parametric cubic curve
surface. Bezier surface, as a result, is easicr to use because the control points themselves
approximate the location of the desired surface. Bezier surfaces can be generated with any
order of the Bezier curve. Two surface patches can be joined and the two surfaces do not
have to be of the samc order, one can be cubic and the other a quadratic.

The general equation of Bezier surface can then be expressed as

, osvs l

(2.48)
where P(u, v) is any point on the surface and Pij are the control points. and are the
Bemstein blending functions in u And v directions.

Similar to Hermite surface formulation, the above equation (2.48) of Bezier surface can
be written in matrix form as

P(u, v) = U. [MD] • [P] • [MD]T . VT


where
= B-spline matrix as discussed in Bezier curve formulation and

Geometric coefficient matrix or boundary condition matrix,

u u I and

ptftnc

curvc is defined by n + I control points and it passes through the two extreme it employs the
interior points to determine its shape. Similarly, a Bezier surface .s defined by a rectangular grid Of
(n + l) x (m + l) control points. It is attached at the comer points and it employs the other grid points
to determine its shape. (n + l) x (m + ogidOfcontrol points can be arranged in a roughly rectangular
grid as

POI 0m 1m

nm

Cubic Bezier Surface

ftbic Bezier surfaces are very useful in computer graphics for software development. recubic
Bezier surfaces can be obtained by substituting n = 3 and m = 3 into the equation

above equation be expanded


. . . (2.50)
E Bi,3 (u) [Pi,o (v) + Pi,l + (v) +
POI P02

P12

(u) BIB (u) (u) 21 P22


P32

. . . (2.51)
2.66 Computer Aided

or

3u(l—u 311 2 (1- u31[p]


or

P(u,v) = (2.52)

where U
Hence, v = 3v(l-v)2

Figure 2.36 shows two Bezier surface plots. The control points are connected by
dashed lines and the solid lines show curves of constant u and constant v. Each curve
of constant u is plotted by varying v over the interval from O to 1 with u fixed at one
of the values in this unit interval. Curves of constant v are similarly plotted. Bezier
surfaces constructed for (a) "11 - 3, n = 3 and (b) m = 4, n = 4. Dashed lines connect
the control points.

A cubic Bczier surface is represented with 16 control points and it must be


specified and several Bezier surfaces can be combined to create a complex surface.
(b)
Modeling

2.68 Computer

Aided Design and Manufacturing


Blending Bezier patches with slope continuity rcquires that (l) control points on the common edges bc
shared and (2) three control points — one on the edge and one on the either sides of the cdge to form a
straight line shown in Figure 2.37 below.

In Bezier surface,

(i) The surface takes the general shape of the control points.
(ii) The surface is contained within the convex hull of the control points.

(iii) The corner of the surface and the corner control points are coincident.

2.13.2. Properties of Bezier Surface


(i) Similar to Bezier curves, Bezier surfaces retain the convex hull property so that any point on the
actual surface will fall within the convex hull of the control points.

With Bezier curves, the culve will interpolate (pass through) the first and last control points but it
will only approximate other control points.

(iii) With Bezier surfaces, 4 corners will interpolate and other 12 points in the control mesh are
only approximated.

(iv) Four boundaries of the Bezier surface are just Bezier curves dcfined by points on edges of the
surface.

(v) By matching these points, two Bezier surfaces can be precisely connected.

(vi) The continuity of surface in each parametric direction is 2 less than the num ber of vertices of the
control net in the saine direction.

(vii) The surfacc generally follows the shape of the control net.

(viii) The surface passes through only the four comer points of the control net.

(ix) The tangent plane to the surface at a corner point is spanned by two sides Ofthe control net
joining the same corner point.

(x) The direction and magnitude of the twist vectors at four corners Poo, PO,'" Pnon and Pm,o of
the control net are influcnced by their neighbouring points,

(xi) The surface is invariant under affine transformations which that the transformed ilnage ofthc
surface patch is also a Bezier surface paßfh•
Vic
2.69

Advantages and Disadvantages of Bezier Surface vntages:


Modeling
(i) Bezier patch meshes are superior to meshes of triangles as a representation of smooth surfaces

since they are much more compact, easier to manipulate and they have much better continuity

properties.

(ii) In addition, other common parametric surfaces such as spheres and cylinders can be well
approximated by relatively small numbers of cubic Bezier patches.

(iii) It is easy to enumerate points on surface.

(iv) It is possible to describe complex shapes. Dtadvantages:

(i) Bezier patch meshes are directly difficult to render.

(ii) Their intersections calculations with lines are difficult.

(iii) It makes use of awkward for pure ray tracing or other direct geometric techniques which do not
use subdivision or successive approximation techniques. They are also difficult to combine
directly with perspective projection algorithms.

(iv) Control Inesh must be quadrilaterals.

(v) Continuity constrains are difficult to maintain.

(vi) It is hard to find intersections.

214. B.SPLINE SURFACE


Using a corresponding basis function, uniform cubic B-Spline surface can be formed.

basis function for a cubic B-spline surface is similar to a cubic B-spline curve. It has a net Of control
points which define the surface, none of which interpolate the patch, as in the case Of the B-spline curve.
Similar to an advantage of B-spline surface, it supports local control Of the surface. Composite surfaces can
be obtained by combining several surface patches.

uniform B-spline surface patch is constructed as a Cartesian product of two uniform B•spline curves. A
rectangular set of control points creates the B-Spline surface, This set

the vertices of the characteristics polyhedron which approximates and controls the shape Of thelusulting B-
spline surface. The degree of
2.70 Computer Aided Design and the surface is independent of
the Manufacturing

number of control points. The continuity is automatically maintained throughout the surface by virtue of the
form of blending functions.
A B-spline surface defined by an (n + I) x (m + l) array of control points is defined as
n

max
. (2.53)

where P(u, v) is any point on the surface and Pij are the control points. and are the B-spline
basis functions of degree k and l, respectively, defined with respect to the knot vectors in both u
and v directions. These knot vectors are constant but not necessarily equal. It has a knot vector of
h + 1 knots in the u-direction, U = { 110, 111, ...., uh } and a knot vector of k + I knots in the v-
direction, V = { vo, VI, ...., Vk }. It is noted that the fundamental identities, one for each direction,
must hold: h = n +j + I and k = + I + 1. Therefore, a B. spline surface is another example of tensor
product surfaces. As in Bezier surfaces, the set of control points is usually referred as the control
net and the range of u and v is 0 and l. Hence, a B-spline surface maps the unit square to a
rectangular surface patch.

Similar to Bezier surface formulation, the above equation (2.53) of B-spline surface can be
written in matrix form given by

P(u, V) = U. [MBez] . [P] . . VT ... (2.54)


where
[MBc] = Bezier matrix as discussed in the equation (2.21) of B-spline cu rve formulation, and

— Geometric coefficient matrix or boundary condition matrix.


n n—l
u u u 1 and

Vm—l

2.14.1. Cubic B-Spline Surface


The bicubic B-spline patch is defined by a rectangular grid of 4x4 control points'
Similar to Bezier bicubic formulation, cubic B-Spline surface formulation can also be

2.15. SOLID MODELING


Solid modeling is the most powerful 3D modeling technique. Solid models are considered as
complete, valid and unambiguous representation of objects. The completeness
Modeling

2.71
infonttation contained in solid allows the automatic production of rcaligtic of a shape and automation 0t the
process of intcrfcrcncc checking, In many lic3tions, it is important to distinguish bctwccn inside, outside and
surfacc of a 3D objcct. classification is called spatial addressability or set Inenibers/lip classification. fris

Same geometry
-Different topology
Figure 2.38

A valid solid model should not have sagging edges or faces. So, it will allow the analysis, mass property
calculations, finite element modeling and analysis, mehine vision and NC palt progralnming. Solid model can be
quickly created without to define the individual location as in case of wireframe ruodels. In many cases, solid models
are easier than wireframe or surface models,

Solid models should contain two types of infonnation such as ntetric or geometric data or topological data. The
geometric data relate to the coordinate positions of Of the object or actual dimensions that define entities of the
object. The ogical data refers to the connectivity und associatively of the object entities. For solid both information
are necessary as different shapes can result the satne geometry with

2.72 Computer Aided Design and Manufacturing

different topolou and different geometry with same topolog. Figure 2.38 illustrate the difference
between these two.

2.15.1. Solid Model Representation


There are three different forms in which a solid model can be represented in CAD

Wireframe model Surface


model Solid model.
(a) Wireframc models:
Joining points and curves creates wireframe models. These models can be ambiguous and
unable to provide mass property calculations, hidden surface removal or generation of shaded
Images. Wireframe models are mainly used for a quick verification of design ideas.

(b) Surface models:


Surface models are created using points, lines and planes. A surface model is unable to identify
points that do not lie on the surface, and therefore, the moment of inertia, volume, or sections of the
model cannot be obtained. A surface model can be shaded for better visibility. Surface models are
used for modeling surfaces of engineering components.

(c) Solid modcls:


Solid models are the most preferred form of CAD models and they represent unambiguous
image of a component. A solid model can be used to analyze the moment Of inertia, mass, volume,
sections of the model, etc.

2.15.2. Solid Modeling Entities


Modeling
Solid modeling entities are building blocks which are also called primitives. Most Of the
commercially available solid modeling packages such as AutoCAD, solidWorkS' Unigraphics,
IDEAS, Pro/Engineer etc. have certain set of solid primitives which can be combined by a
mathematical set of Boolean operations to create the solid model. A solid modeler has a library of
set of primitives such as block, cylinder, sphere, cone, wedge' torus etc (as shown in Figure 2.39).

The short description of different solid primitives is given below.

(a) Block:

It is a cuboid or box which is represented by its width, height and depth.

tric

Block Sphere
Cone Wedge Torus
Figure 2.39 Basic solidprimitives

p) Cylinder:

It is a right circular cylinder whosc geometry is defined by its radius or diameter and length.

(c) Cone:

It is a right circular cone or frustum of a right circular cone whose geometry is defined by its base radius,
top radius and height.

(d) Sphere:

It is defined by its radius or diameter and it is centered about the origin.

(e) Wedge:

It is a right angled wedge whose geometry is defined by its height, width and base
depth.

(D Torus:

It is generated by the revolution of a circle about an axis lying in its plane. The geometry can be defined by

both inner radius and outer radius.

215.3. Solid Modeling Approaches


There are two different types of solid modeling approaches: prbnitive based modeling andfeature based
modeling.

In Primitive based modeling, designers use the predefined primitives described above to create complex solids.
Designers must use Boolean operations to cornbine the primitives and Produce the required shape. A right combination
of primitives is selected and their specific Instances are used as bricks or elcmcnts to build the solid. The available
Boolean operations union Or combination (u or +), intersection (n or l) and difference or subtraction
The union operator is used to combine or add two prilüitives. The intersection operator gives a shape cqual to
their common volume. The diffi2rencc opcmtor is used to subtmct one

2.74 Computer Aided Design and Manufacturing

object from the other object and it results a shape cqual to the difference in their volume. An
example for this activity is shown in Figure 2.40. This approach is limited by the restricted shapes of
the primitives.

A-B An B
Resulting solids

(a) Prünitives (b) Union (c) Subtraction (d) Intersection

Figure 2.40 Types of2D Boolean operations


Feature based modeling is more flexible because it allows the construction of more complex
shape and it claborates solids more readily than the primitive based modeling. This type of modeling
is in fact a generalization of primitives approach. Here also, Boolean operations are used but they are
hidden fromthe user.

For example, creating a protrusion on the facc of a cube is a Boolean union and creating a cut in
the cube is a Boolean subtraction. These operations arc must for the creation Of final solid.
Modeling

115.4.
Representationof

AnB

Boolean operations

A part lying in the three-dimensional space can be defined as a combination of the *r,boundary and
exterior or surface of the object. This understanding helps not only in ig the part but also in locating its
topology. The interior and exterior of the object are separated by boundary.
A solid model of the object can bc mathematically defined as a set of points S in threeensional Euclidean
space (M). This solid is having boundary equal to bS, interior equal to
exterior equal to the complement of S and written as cS. As the iS excludes the
points

Qeboundary, the object S itself is given by

bS kS

Figure 2.42
universal set of points is a verification thåt W = S u cS= iS u bS u cS. Figure 2.42 the geometric
explanation of thesc equations.

created by geometric modcling must possess the following properties.


2.76 Comp uter Aided Design and Manufactunh9

(a) Rigidity:
It refers to the shape of the solid model as invariant. Solid model does not depend on the
location in space.

(b) Homogeneous three-dimensionality:


No sagging edges or faces, no isolated portions, solid boundaries are in contact with the interiors.

(c) Fitness andfinite describability:


Finiteness refers to the solid which must be finite in size. Finite describability is needed in order
to be able to store solid model into computers.

(d) Boundary determinism:


This property refers to the boundary of a solid which must clearly determine the solid and
contains the interior of the solid.
Modeling
(e) Closure under rigid motion and Boolean operations:
This property is used to produce other valid solids when solids are manipulated by moving them
in space or changing them via Boolean operations.

2.15.5. Representation Schemes


A representation scheme is defined as a relation which maps a valid point set into a valid model.
For example, a Constructive Solid Geometry (CSG) scheme maps the valid primitive into the valid
solid via Boolean operations. A representation scheme usually operates on regularized sets (r-sets) to
produce valid solid models. The r-sets are curved polyhedral with well-behaves boundaries. It
possesses the following propenies.

> It is a closed regular set. They should not be any dangling portions.
> It is a semi-analytic set. It does not oscillate infinitely fast anywhere in the set

Based on the ability to represent an object as perfectly as possible, the schemes are
classified as follows.

(a) Unambiguous, complete and unique:


In this representation scheme, one Inodel is produced by the scheme represents one and

only one object. It is the most desirable though it is not always achievable.

tic 2.77

Unambiguous, complete and not unique:


p)
In this representation scheme, more than one model can represent the object. It is the t desirable though

it is not always achievable.

(c) Ambiguous, incomplete and non-unique:


In this representation scheme, one model can represent many objects. It is true with wire frame models.

The representation schemes have been accorded with the following formal p*flies. These properties

determine their usefulness in geometric modeling.


Formal Property Purpose
Domain It is the geometric coverage of the scheme.

This property produces the valid solids.


'Validity

Completeness or It supports analysis and other engineering applications such


unambiguousness as FEA.

Uniqueness This property is useful to determine object equality.

It provides conciseness and ease of creation.

Information
propertie
s

Efficacy It ensures good accessibility to downstream applications.


i.

Having these properties in mind, various representation schemes have been developed to create solid
models. The prominent among them are the following.

Half-spaces

Boundary representation (B-rep)

Constructive Solid Geometry (CSG)

Sweeping
Modeling
Analytic solid modeling

Cell decomposition
Spatial enumeration

Octree encoding and

Primitive modeling
Out Of which, the
2.78 Computer Aldod Doslgn and following two basic
approaches arc impoflant
from our subject point
Manufacturing

(l) Constmctivc Solid Gcomctry (CSG).


(2) Boundary rcprcscntation (B-rcp.)

2.15.6. Advantages of Solid Modeling


l. Mass properties such as area, volume, weight, center of gravity and moment of incttia of physical
model can be quickly calculated.

2. Solid models are un-ambiguous models.

3. Cross-section views of models can be easily obtained.


4. It can be used for interference/Clearance checking of moving parts.

5. Aesthetic look of finished object can be visualized in the computer screen itselfwith colour
shading, high-lighting and facilities available in solid modelers.

6. Different views of object (Isometric, Perspective and Orthographic view) can be obtained
easily.
7. Solid model is very much useful for finite element analysis.
8. They can help to produce NC machining instructions automatically.

2.16. CONSTRUCTIVE SOLID GEOMETRY (CSG)


Constructive Solid Geometry (CSG) is one of the most popular methods of representing and
building complex solids. In this scheme, simple primitives are combined in certain order by means of
regularized Boolean sct operators which are directly included in the representation. Primitive
thcmselves are valid CSG solid model. The type of Boolean operations is used in CSG are Union (U),
difference (—) and intersection (n). The data representation of CSG objects is represented by a
binary tree. Directed graph (bina1Y tree) scheme is used to store the model in the data structure.
The general form of the tree-type structure used in CSG approach is shown in Figure 2.43. Any
node may have one parent node and two-child node. The root node (R) has no parent and leaf node
(L) has no children, The binary tree gives the complete infonnation of how individual primitives are
combined represent the object. The number of primitives thus decides the number of Boolean
required to construct the binary tree.

The balanced distribution of the tree is desired to achieve minimum computations while
modifying or interrogating a model. A balanced tree can be defined as a tree whose left and right
subtrees have almost an equal nuunber of nodes. The creation of balanced or an
unbalances trec is entirely dependent on the user and it is related to how the priiüitives
Modeling
2.80 Compute r Aided Design and Manufacturlng

(d) (e)

Figure 2.46

For example, to create a model as shown in Figure 2.45, four primitives ¯ two rectangular blocks
and two cylinders are required. To create the final object following
2.81
tion has to be carried out. The CSG tree is organized upside down with the root composite object at the
top and primitives called leaves at the bottom.

Balanced tree

does not provide a unique representation. It can be particularly confusing in a lets the user manipulate the
leaf objects with tweaking operators. Applying the to t',vo objects which are initially the same can yield two
different results Figure 2.46. The object shmnl in (a) may be defined by different CSG operations and (c). The
of the top face of (b) and (c) upward yields different in (d) and (e). Nevertheless, the ability to edit
models by deleting, adding, and modifying is coupled with the relatively compact form in which a-e stored and they
have made CSG as one of the dominant solid modeling gsentations.

l. Since, the data to be stored are less and the memory required will be less.

2 It creates fully valid geometrical solid model.


3. Complex shapes may be developed relatively quicker with the available set of primiffces.

4. Less skill is enough.

5. Theäata file ofCSG is concise.


6. CSG guarantees automatically in which objects draym by CSG are valid.

7. CSG is more user-friendly.

Algorithms for converting CSG into B-Rep have been developed.

computational effort and time are required whenever the model is to be in the screen.

fillet, chamfer and taperness in the model are very diffeult.


CSG database contains information about a solid in an unevaluated form.

4' The validity of a feature of an object cannot be assessed without evaluating the

Thexee is not unique for the same part design,


2.82 Computer Aided Design and Manufacturing
2.16.1.
Solved
Anna
University Problems on Constructive Solid Geometry (CSC)

Sketch the CSG tree for each of the two solids shown below. The solid S2 is divided
symmetrically and it consists offour blocks (Bl to B) and six cylinder (Cl to CO. The dashed line
shown inside S2 in the Figure 2.47(b) is not pan ofS2. It is a hypotheitical line that uses to divide
the top part ofS2 into two blocks Bl and [May'181
Not part of S2
(a) Solid

(b) Solid
Figure 2.47
O Solution:

CSG freefor Solid


Figure 2.48
A CSG tree is an inverted ordered binary tree whose leaf nodes are primitives and interior
nodes are regularized set operations. In this scheme, simple primitives are combined in certain
order by means of regularized Boolean set operators which are directly included in the -
representation. Primitive themselves are valid CSG solid model. The type Of Boolean

Figure 2.49

217. BOUNDARY REPRESENTATION (B-REP)


Boundary representation (also known as B-rep) is based on the concept. A physical object is bounded
by a set of faces. This approach is widely used in most of the solid
This scheme describes an object in terms of its surface boundaries: vertices, edges, faces. Some B-
reps are restricted to planer, polygonal boundaries and it may even require be convex polygons or
triangles. Only the boundary surfaces of the model are stored volumetric propenics are calculatcd by the
Gauss Divergence theorem which relates integral to surface integrals.
The solid model created by using B-rep technique may be stored in graph based on data system. It is
illustrated with a silnple examplc of tetrahedron shown in 2.50
tetrahedron is composed of four vertices namely, A, B, C and D. The coordinate of vertices is storcd
in the database. Figure 2.50 (b) shows how the vertices arc connected

b, c, d, c andJ) and how these cdges are connected together to form the face BCD, 'ACD,
ABD) which makes the complete solid of tetrahedron. This connectivity to the soliåis popularly known
as topology.
2.84 Computer Aided Design and Manufacturing

Solid (ABCD)Tetrahedro
n

DFaces (ABC ABD)

f Edges
c

(a)

TetrahedronVertices

(b) Graph based data structure of tetrahedron

Figure 2.50 Illustration ofB-rep data structure


oftetrahedron

In a B-rep model, in addition to store the topology of solid,


topological consistency of the models is also carried out in
order to create geometrically valid solid models. For topological
consistency, certain rules have to be followed. They are as
follows.

(a) Faces should be bound by a simple ,loop of edges and


they should be not intersected by itself
(b) Each edge should exactly adjoin two faces and each
edge should have a vertex at each end.
(c) At least three edges, it should meet at each vertex.
In a B-rep, the surface of the solids has its interior and
exterior. The surface consists Ofa set of well-organized faces.
The two important areas for B-rep models are the topological and
geometrical information. Topological information provides the
relationship about vertices' edges and faces. In addition to
connectivity, topological information also includes the
orientation of edges and faces. Geometric information is usually
in terms of equations Of the edges and faces. For better
understanding of the difference between CSG and B-rep schemes'
the information contained in a same solid in both the schemes are
given in Figure 2.51 •

As stated earlier, in B-rep scheme, the solid is made of a set


of faces. These faces are subsets of closed and orientable
surfaces. A closed surface is one and it is continUOUS without
break. In an orientable surface, it is possible to distinguish
two sides by using the direction of the surface normal to point
inside or outside the solid face is bounded by edges and
cach edge is bounded by vertices.
2.85

(a)Desiredobject (b) CSG information

Bottom view

view Front view Left side view

Top view

(c) B-rep information


2.86 Computer Aided Design and
Comparison ofCSG and B-rep information(First angleprojection isfollowed) Manufactunh9

B-rep scheme can model a variety of solids depending on the primitive surfaces
(planar curved, or sculptured). There are fivo types of solid models in this scheme.

(a) Polyhedral solids


(b) Curved solids.
(a) Polyhedral solids:
Polyhedral solids consist of straight cdges, c.g., a non-cylindrical surface: box, wedge
combination of two or morc non-cylindrical bodies, ctc. Polyhcdral solids can have blind
or through holes and two or threc-dimcnsional faces with no dangling cdges. A valid
polyhednl abides by Euler's equation. Euler has proved that polyhedral are homomorphic
to a sphere or topologically valid if they satisfy the following equations.

where
F = Number of faces
E = Number of edges
V = Number of vertices
L = Face's inner loop
B = Bodies
G = Genus (handles or through holes)

The following examples describe how this equation is applied for some simple
polyhedral objects.

Example 1: A cuboid shown in Figure 2.52(a) has F = 6, E = 12 and V = 8.


Applying Euler's rule for this cuboid.
. 6— 12 + 8 = 2. :.Euler rule satisfied.

Example 2:
A tetrahedron shown in Figure 2.52(b) has F = 4, E = 6 and V = 4. Applying
Euler's rule for this tetrahedron
+4 = 2. :.Euler rule satisfied.

Example 3: shown in Figure 2.52(c) has F = 8, E = 18 and V = 12. Applying Euler's rule for
A solid
this solid
8— 18 + 12 = 2. :.Euler rule satisfied.
Modeling 2.87

Figure 2.52

Open solids that are not homomorphic to a sphere (shown in Figure 2.53) satisfr the

{lowing version of Euler formula.

F-E+ V-L=B-G
In this equation, B refers to an open body such as wire, an area or a volume.

(b) Lamina open polydra

Shell open polydra (d) Open polydra


objects 11'i1hout topface

Figllrc 2.53 Open solids

Fotsimple solids without holes, it should satisfy the following Euler's rule

F-E+V-2

Apply this Euler's rule for tetrahedron,


4—6+4=2 satisfied.

2.88 Co mputerAided Design and

Manufacturing For bodies with holes and re-entrant face, it should satisfy Euler-Poincare

formula

F-E+ V-H+2P=2B
where H = Number of holes or interior edge loops
P = Number of passages or through holes
B = Number of separate bodies

Even if the topological consistency is achieved, in some cases similar to solids having
concave faces will not give geometrically valid solid.

(b) Curved solids:


A curved solid is similar to a polyhedral object but it has curved faces and
edges. Spheres and cylinders shown in Figure 2.54 are examples of curved solids.

(a) (b)

Figure 2.54 Curved


solids sphere with 1, V= 1, Cylinder:
3, 3,

As stated earlier, a valid B-rep solid must satisfy the Euler-Poincare formula.
For this purpose, various elements or primitives of the B-rep model are defined as
follows:

(a) Vertices:
It is a point in three-dimensional Euclidian space.

(b) Edge:
It is a finite, non-intersecting space curve bounded by two vertices that are not
necessarily distinct.
Modeling 2.89
(c) Face:
It is a finite connected, non-self-intersecting, region of a closed oriented surface and
bounded by one or more loops.

non-sclf-
• g closed spacecurve which may be a boundaryof a
face.

/ Bdy:

entity that has faces, edges and vertices. Minimum body is a point.

0 Boundary hole:

It isa blind hole.

g) Interior 1801c:

Itis hole which is lying inside and having no boundary on surface of the solid.

(t) Genus:

It is the topological name for the number of through holes or handles in an object. A tough hole

may be termed as a three-dimensional hole. Some of the elements are shown in figur2.55.
2.90 Com

reasons.

but it is not 50 in B-rep.

superior to CSG scheme for

from B-rep to CSG is

Edge
puter Aided Design and Manufacturing

4. Combining the wire frame and surface model is possible only through B-
rep solid reprcsentation.
Advantages:
l . Computational effort and time required to display the model are less compared
with CSG.
2. Combining wire frame and surface model are possible.

3. Complex engineering objects can be easily modeled compared with


CSO

Examples are aircraft fuselage and automobile body styling.


4. The information is complete especially for adjacent topology relations.
5. Since the topology and geometry are treated separately, incorporating
new geometries in the existing model is easy.
Modeling 2.91
6. It is particularly suitable for modeling palt having internal symmetry.
7. Computational effort and time required to display the model are less
compared to CSG.
8. This fonnat gives efficient picture generation and easy access to other
geometric information.
9. The B-rep model is widely used due to the number of basic primitiv.es
available is limited in CSG.
10. It is easy to create objects by 'sweeping', i.e a complex two-dimensional
profile may be translated or rotated about an axis to give the shape in
three dimensions.

I l . Considerable number of methodologies developed for engineering


analyses is based on B-Rep.

Disadvantages:

J The data to be stored is more and hence, it requires more memory. so, it
is not suitable for tool-path generation.

2. Sometimes, geometrically valid solids arc not possible.


3. There is no guarantee for the created object to check whether it is valid
or not'
4. It is generally less robust than the half-space method.
5. Each and every object is defined independently without reference to
other Objects in the system. So, it is not easy to define 'generic' or,

2,91
6. Thc data
conversion of CSGof
structure toB-rep
B-rep is possible.
complexAt the samcto
coinpared time,
CSG.the convcrsion for

Brcp to CSG is impossible.


B_rcp rcquires further feature extraction procedures to cxtract fcaturcs from its face-
edge veflex database.
B-rep model does not provide any explicit information spatial constrains between

features.

DIFFERENCE BETWEEN SOLID MODELLING AND SURFACE MODELLING


Solid modelling
Surface modelling

Surface modeling focuses more


on the cxtcrnal aspects of an
Solid modeling is for representing object.
l. solid objects in the areas of CAD,
engineering analysis, graphics and
animation as well as prototyping
and product visualization.

It uses mathematical principles to


create 3D solid objects. It develops an object by
stretching a surface over it with
3D curves created by the
designer. It is essentially
describing the surface
boundaries of the object.

It lacks the "watertight" feature


of solid modeling because if it is
The object is able to bc seen in to cut into the design, it would
geographic terms, and it is be hollow.
considered a "watertight" model
because the intemal details of the
product are often included,

Solid models are used in intersection,


joining and subtracting the objects
Surface modeling is used for
•from one another to create the creating the extemal aesthetics
desired of a product or design. It can
allow for more five-form shapes
•tesults as far as shape and form
and it is considered sleeker by
some.

You might also like