Sunteți pe pagina 1din 45

Surface Modeling

UNIT 5 SURFACE MODELING


Structure
5.1 Introduction
Objectives

5.2 Basic Concepts


5.3 Surfaces of Revolution
5.4 Sweep Surfaces
5.5 Summary

5.1 INTRODUCTION
Smooth curves and surfaces must be generated in many computer graphics applications.
Many real-world objects are inherently smooth (Figure 5.1), and much of computer
graphics involves modeling the real world.

Figure 5.1 : A Sparrow, that Requires a Smooth, Colorful Modelling in Computer Graphics

Computer-aided design (CAD), high-quality character fonts, data plots, and artists’
sketches all contain smooth curves and surfaces. The path of a camera or object in an
animation sequence is almost always smooth.
The need to represent curves and surfaces arises in two cases :
(i) modeling existing objects (like a car, a face, a mountain, a toy etc.);
(ii) modeling “from scratch” (so-called image synthesis), where no physical
object is existing and the same is to be modelled.
The process of modelling is much easier, if mathematical description of an object, or at
least of part of an object may be applied. In the first case, however, a mathematical
description of the object may be unavailable. One way of solution is to use as a model the
coordinates of the infinitely many points of the object, but this is not feasible for a
computer with finite storage. More often, the object is merely approximated with pieces
(called patches, in the case of surface modelling) of planes, spheres, or other shapes that
are easy to describe mathematically, and require that points on the model be close to
corresponding points on the object.
In the second case, when there is no pre-existing object to model, the user creates the
object in the modeling process; hence, the object matches its representation exactly,
because its only embodiment is the representation. To create the object, the user may
sculpt the object interactively, describe it mathematically, or give an approximate shape.
Surface can be defined mathematically in 3-D space by non-parametric and parametric
equations.
∴ The equation of surface is p (x, y, z)
p (x, y, z) = [x, y, z] . . . (5.1)
41
Geometric Modeling where z = g (x, y).
The natural form of z is a polynomial passing through all the points, that is
p q
z = g ( x, y ) = ∑ ∑ bmn . x m . y n . . . (5.2)
m=0 n=0

where the surface is described by an xy grid of size (p + 1) × (q + 1) points. There are two
popular methods of fitting non-parametric surfaces. One is by fitting a surface passing
through all the data points, the other one is to develop a series of surface patches taking
some set of data points into consideration and later all such surface patches are connected
with C0 and C1 continuity. Eqs. (5.1) and (5.2) hold good for surface patches as well.
Non-parametric surfaces suffer from all the disadvantages compared to parametric
surface similar to non-parametric curves.
A general 3-D surface can be modeled by dividing it into an assembly of topological
patches. A patch is a basic mathematical element to model a composite surface. A
surface can be formed by a single patch or assembly of many patches.

Objectives
After studying this unit, you should be able to
• know the basic concepts of geometric surface modeling, and
• generate a three-dimensional surface by revolving a two-dimensional entity

5.2 BASIC CONCEPTS


There are two types of surfaces – parametric and implicit – that are commonly used in
modeling systems. Parametric surfaces are defined by a set of three functions, one for
each coordinate, as follows :
p (u, v) = (x (u, v), y (u, v), z (u, v))
where parameters u and v are in certain domain. For our purpose, we shall assume both u
and v are in the range of 0 and 1. Thus, (u, v) is a point in the square defined by (0, 0), (1,
0), (0, 1) and (1, 1) in the uv-coordinate plane. Figure 5.2 illustrates this concept.

Figure 5.2 : Parametric Model of Surface

Implicit surfaces, on the other hand, are defined by a polynomial of three


variables :
p (x, y, z) = 0
Similar to curves, if x (u, v), y (u, v) and z (u, v) are polynomials, parametric surfaces will
not be able to represent many surfaces that are normally described by implicit surfaces.
The sphere is a good example. You can easily prove this fact with an argument similar to
that used for circles. If x (u, v), y (u, v) and z (u, v) are rational polynomials (i.e.,
42 quotients of two polynomials), parametric surfaces can represent spheres, ellipsoids and
many other surfaces. However, similar to curves, many implicit surfaces do not have any Surface Modeling
parametric form. Therefore, in terms of expressive power, implicit surfaces are more
powerful than parametric surfaces.
Surfaces which have polynomial (implicit) forms are called algebraic surfaces. The
highest degree of all terms is the degree of the algebraic surface. Therefore, spheres and
all quadric surfaces are algebraic surfaces of degree two, while torus is a degree four
algebraic surface.
Some algebraic surfaces have rational parametric forms such as spheres and all quadric
surfaces. These type of algebraic surfaces are called rational algebraic surfaces.
Theoretically, given an algebraic surface in rational parametric form, it is always possible
to eliminate parameters u and v so that the result is in an implicit form. This process of
conversion (from parametric to implicit) is called implicitization.
Analogous to curves, there are analytic and synthetic surfaces. Analytic surfaces are
based on wire-frame entities and include the plane surface, ruled surface, surface of
revolution, and tabulated cylinder. Synthetic surfaces are formed from a given set of data
points or curves and include the bi cubic, Bezier, B-spline, and Coons patches. There are
few methods to generate synthetic surfaces such as the tensor product method, rational
method, and blending method. The rational method develops rational surfaces which is
an extension of rational curves. The blending method approximates a surface by
piecewise surfaces.
The tensor product method is the most popular method and is widely used in surface
modeling. Its widespread use is largely due to its simple separable nature involving only
products of univariate basis functions, usually polynomials. It introduces no new
conceptual complications due to the higher dimensionality of a surface over a curve. The
properties of tensor product surfaces can easily be deduced from properties of the
underlying curve schemes. The tensor product formulation is a mapping of a rectangular
domain described by the u and v values; e.g., 0 < u < 1 and 0 < v < 1. Tensor product
surfaces fit naturally onto rectangular patches. In addition, they have an explicit unique
orientation (triangulation of a surface is not unique) and special parametric or coordinate
directions associated with each independent parametric variable.
Parametric Surfaces
The parametric surfaces or more precisely parametric surface patches are not used
individually. Normally, many parametric surface patches are joined together side-
by-side to form a more complicated shape. Figure 5.3 shows four parametric
surface patches joined together to form a larger surfaces. Here each parametric
surface is a rectangular patch.

Figure 5.3 : Surface Formed by Rectangular Patches

There is a set of boundary conditions associated with a rectangular patch. There are
sixteen vectors and four boundary curves as shown in Figure 5.4. The vectors are four
position vectors for the four corner/Points P (0, 0), P (1, 0), P (1, 1), and P (0, 1); eight
tangent vectors (two at each corner); and four twist vectors at the corner points. The four
boundary curves are described by holding one parametric variable. The boundary curves
are then defined by the curve equations u = 0, u = 1, v = 0, and v = 1. 43
Geometric Modeling

Figure 5.4 : A Parametric Surface Patch with its Boundary Conditions

The advantage of geometrically defined surfaces in CAM apart from CAD is that
knowing the tangent vectors to a surface enables driving a cutting tool along the surface
to machine it and knowing the normal vectors to the surface provides the proper
directions for the tool to approach and retract from the surface.
To compute the tangent and normal vector at a point (u, v) in the given domain, we may
need the partial derivatives. Suppose the parametric surface is defined as follows:
p (u, v) = (x (u, v), y (u, v), z (u, v)) . . . (5.3)
Umin < u < umax, vmin < v < vmax
The partial derivatives with respect to u and v are the tangent vectors at p (u ,v) :
∂p ⎛ ∂x ∂y ∂z ⎞ ∂p ⎛ ∂x ∂y ∂z ⎞
= ⎜ , , ⎟ and = , , . . . (5.4)
∂u ⎝ ∂u ∂u ∂u ⎠ ∂v ⎜⎝ ∂v ∂v ∂v ⎟⎠
where ∂p/∂u is the tangent vector in the u-direction while ∂p/∂v is the tangent vector in
the v-direction. The normal vector at p(u, v), n(u, v) is the cross-product of these partial
derivatives using the right-handed rule :
∂p ∂p
×
n= ∂u ∂v . . . (5.5)
∂p ∂p
×
∂u ∂v
A parametric surface patch can be considered as a union of (infinite number) of curves.
There are many ways to form these unions of curves; but, the simplest one is the
so-called iso-parametric curve. Given a parametric surface p (u, v), if u is fixed to a
value, say 0.1, and let v vary, this generates a curve on the surface whose u coordinate is
a constant. This is the isoparametric curve in the v direction with u = 0, 1. Similarly,
fixing v to a value and letting u vary from 0 to 1, we obtain an isoparametric curve whose
v direction is a constant. Therefore, let u be fixed at 0, 0.1, 0.1, . . . , 0.9 and 1, we shall
44 have 11 isoparametric curves p (0, v), p (0.1, v), p (0.2, v), . . . , p (0.9, v) and
p (1, v). These curves sweep out the surface if we let u change from 0 to 1 continuously. Surface Modeling
Similarly, the isoparametric curves generated by varying v cover the surface. Figure 5.5
shows a few isoparametric curves in both directions.

Figure 5.5 : Isoparametric Curves on a Surface

These isoparametric curves can help to render the surface. In many applications, a
parametric surface is “triangulated” into triangles or polygons. Then, these triangles and
polygons can be rendered very efficiently with existing graphic tool libraries such as
OpenGL and PHIGS PLUS.
Instead of triangulating the surface, it would be easier to triangulate the domain of (u, v).
We can subdivide the u-direction into m segments with u0 = 0, u1, . . . , ui, . . . , um = 1 and
subdivide the v-direction into n segments with v0 = 0, v1, . . . , vj, . . . , un = 1. The domain
is subdivided into m × n rectangles, each of which can be further subdivided into two
triangles as shown in Figure 5.6.

Figure 5.6

Suppose ui and ui+1 are two consecutive division points in the u-direction and vj and vj + 1
in the v-direction as shown in Figure 5.6. We have a rectangle in the domain with
vertices (ui, vj), (ui + 1, vj), (ui + 1, vj + 1) and (ui, vj + 1). We have two ways to obtain the
triangles because this rectangle has two diagonals. The first triangle is defined by (ui, vj),
(ui + 1, vj) and (ui, vj + 1) and the second triangle is defined by (ui + 1, vj), (ui + 1, vj + 1)
and (ui, vj + 1).
Consider the triangle defined by (ui, vj), (ui + 1, vj) and (ui, vj + 1). These three points are
mapped to three points on the surface p(ui, vj), p(ui + 1, vj) and p(ui, vj + 1) with normal
vectors n (ui, vj), n (ui + 1, vj) and n (ui, vj + 1). Now, we have three vertices each of which
has a normal vector. These six pieces of information are sufficient to render the triangle
smoothly. As a result, we have a method for rendering a parametric surface. Or, put it in
another way, we have a method for generating a set of triangles that approximate the 45
Geometric Modeling given parametric surface. This approximation may not be a good one because it could
have too many triangles and some of these triangles may be in wrong positions or too
small. This situation, however, can be improved by an “adaptive” technique. An adaptive
technique dynamically adjusts the sizes, the number and the positions of triangles.
The Differential geometry is used for the measurements of lengths and areas, the
specification of directions and angles and the definition of curvature on a surface. The
parametric surface P (u, v) is directly amenable to differential analysis. There are intrinsic
differential characteristics of a surface such as the unit normal and the principal
curvatures and directions which are independent of parameterization. These
characteristics require introducing few parametric derivatives.
The tangent vector concept can be extended to surfaces. The tangent vector at any point
P (u, v) on the surface is obtained by holding one parameter constant and differentiating
with respect to the other. Therefore, there are two tangent vectors, a tangent to each of
the intersecting curves passing through the point as shown in Figure 5.5. These vectors
are given by :
∂p ∂x ˆ ∂y ˆ ∂z ˆ
pu (u, v) = = i + j+ k umin ≤ u ≤ umax , vmin ≤ v ≤ vmax
∂v ∂u ∂u ∂u
along the v = constant curve, and
∂P ∂x ˆ ∂y ˆ ∂z ˆ
fu (u, v) = = i + j+ k umin ≤ u ≤ umax , vmin ≤ v ≤ vmax
∂v ∂v ∂v ∂v
along the u = constant curve. These two equations can be combined to give

⎡ ∂x ∂y ∂z ⎤
⎡ pu ⎤ ⎢ ∂u ∂u ∂u ⎥
⎢ p ⎥ = ⎢ ∂x ∂y ∂z ⎥

⎣ v⎦ ⎢
⎢⎣ ∂v ∂v ∂v ⎥⎦

If the dot product of the two tangent vectors is equal to zero at a point on a surface, then
the two vectors are perpendicular to one another at that point. Figure 5.4 shows the
tangent vectors at the corner points of a rectangular patch and at point Pij. The notation
∂P/∂u |Pij, for example, means that the derivative is calculated at the point Pij defined by u
= ui and v = vj. Tangent vectors are useful in determining boundary conditions for
patching surfaces together as well as defining the motion of cutters along the surfaces
during machining processes. The magnitudes and unit vectors of the tangent vectors are
given by
2 2 2
⎛ ∂x ⎞ ⎛ ∂y ⎞ ⎛ ∂z ⎞
| pu | = ⎜ ⎟ + ⎜ ⎟ + ⎜ ⎟
⎝ ∂u ⎠ ⎝ ∂u ⎠ ⎝ ∂u ⎠

2 2 2
⎛ ∂x ⎞ ⎛ ∂y ⎞ ⎛ ∂z ⎞
| pv | = ⎜ ⎟ + ⎜ ⎟ + ⎜ ⎟
⎝ ∂v ⎠ ⎝ ∂v ⎠ ⎝ ∂v ⎠

pu p
and nˆu = ; nˆv = v
| pu | | pv |

The slopes to a given curve on a surface can be evaluated, although they are less
significant and seldom used in surface analysis.
The twist vector at a point on a surface is said to measure the twist in the surface at the
point. It is the rate of change of the tangent vector Pu with respect to v or pv with respect
to u, or it is the cross (mixed) derivative vector at the point. Figure 5.7 shows the
geometric interpretation of the twist vector. If we increment u and v by Δu and Δv
respectively and draw the tangent vectors as shown, the incremental changes in pu and pv
46 at point p, whose position vector is p (u, v), are obtained by translating pu (u, v + Δv) and
pv (u + Δu, v) to p and forming the two triangles shown. The incremental rate of change Surface Modeling
of the two tangent vectors becomes ΔPu/Δv and ΔPv/Δu, and the infinitesimal rate of
change is given by the following limits :

Δpu ∂pu ∂2 p
lim = = = puv
Δv→0 pv ∂v ∂u ∂v

Δpu ∂pu ∂2 p
lim = = = puv
Δv→0 ∂u ∂u ∂u ∂v

Figure 5.7 : Geometric Interpretation of Twist Vectors

The twist vector can be written in terms of its Cartesian components as


T
⎡ ∂2 x ∂2 y ∂2 z ⎤ ∂2 x ˆ ∂2 y ˆ ∂2 z ˆ
pu v =⎢ ⎥ = i + j + k
⎣ ∂u ∂v ∂u ∂v ∂u ∂v ⎦ ∂u ∂v ∂u ∂v ∂u ∂v

umin ≤ u ≤ umax , vmin ≤ v ≤ vmax

The twist vector depends on both the surface geometric characteristics and its
parameterization. Due to the latter dependency, interpreting the twist vector in
geometrical terms may be misleading since puv ≠ 0 does not necessarily imply a twist in a
surface. For example, a flat plane is not a twisted surface. However, depending on its
parametric equation, puv may or may not be zero.
The normal to a surface is another important analytical property. It is used to calculate
cutter offsets for three-dimensional NC programming to machine surfaces, volume
calculations, and shading of a surface model. The surface normal at a point is – a vector
which is perpendicular to both tangent vectors at the point (Figure 5.7) that is,
∂p ∂p
N (u, v) = × = pu × pv
∂u ∂v
and the unit normal vector is given by
N p × pv
nˆ = = u
| N | | pu × pv |

The order of the cross-product in the above equation can be reversed and still defines the
normal vector. The sense of N, or n̂ , is chosen to suit the application. In machining, the
sense of n̂ is usually chosen so that n̂ points away from the surface being machined. In
volume calculations, the sense of n̂ is chosen positive when pointing toward existing
material and negative when pointing to holes in the part.
47
Geometric Modeling The surface normal is zero when pu × pv = 0. This occurs at points lying on a cusp, ridge,
or a self-intersecting surface. It can also occur when the two derivatives pu and pv are
parallel, or when one of them has a zero magnitude. The latter cases correspond to a
pathological parameterization, which can be remedied.

5.3 SURFACES OF REVOLUTION


Surface of revolution is a method of generating a three-dimensional surface by revolving
a two-dimensional entity, such as, a line, a plane curve, about an axis in space. For
simplicity, initially the axis of rotation is assumed coincident with the x-axis and in the
positive direction. The point, line or plane curve to be rotated is assumed to lie in the
xy-plane.
The simplest entity like a point is rotated about an axis which does not lie on the axis is
rotated through an angle of 2π yields a circle. Rotation through an angle less than 2π
yields a circular arc.
If the entity is a line segment parallel to and not coincident with the axis of rotation and
rotation through an angle of 2π (360°) yields a circular cylinder. The radius of the
cylinder is the perpendicular distance from the line to the rotation axis. The length of the
cylinder is the length of the line segment (Figure 5.8).

Figure 5.8 : Cylindrical Surface of Revolution

If the line segment and the axis of rotation are coplanar and the line segment is not
parallel to the rotation axis, then rotation about the axis through 2π (360o) yields a
truncated right circular cone. The radius of the cone at each end is the perpendicular
distance from the end points of the line segment to the axis of rotation. The length of the
cone is the projected length of the line segment on the rotation axis. An example is
shown in Figures 5.9(a) and (b). Closed or open polygons can also be used to generate
surfaces of revolution. An example representing a cone with a cylindrical hole in it is
shown in Figure 5.10.
The parametric equation for a point on a surface of revolution is developed by recalling
that the parametric equation of the entity to be rotated, e.g.,
P (u) = [x(u) y(u) z(u)] 0 < u < umax
is a function of the single parameter u. Rotation about an axis causes the location of the
point to also be a function of the rotation angle φ. Thus, a point on a surface of revolution
is specified by two parameters u and φ. It is a biparametric function as shown in Figure
5.11.
48
Surface Modeling

Figure 5.9 : Conical Surface of Revolution (a) Schematic; and (b) Result

(a)

(a) (b)
Figure 5.10 : A Surface of Revolution from a Closed Polygon Schematic; and (b) Result

Any point on this surface is specified as:


Q (u, φ) = [x(u) y(u) cos φ y(u) sin φ] . . . (5.6)
Rotating plane curves also generate surfaces of revolution. A sphere is generated by
rotating semicircle in the xy plane about the x-axis or y-axis whose center is at origin
(Figure 5.12) where the parametric equation of the circle is p (r, θ).
Px = x = r cos θ 0<θ<π
Py = y = r sin θ
and the parametric equation of the sphere is Q (θ, φ)
Q (θ, φ) = [x(θ) y(θ) cos θ y(θ) sin φ]
= [r cos θ r sin θ cos φ r sin θ sin φ] 0 < θ < π
0 < φ < 2π . . . (5.7)
An ellipsoid is obtained by rotating an origin centered semi-ellipse in the xy-plane either
x or y-axis. The parametric equation of the semi-ellipse is
x = a cos θ 0<θ<π
y = b sin θ
The parametric equation for any point on the ellipsoid of revolution Q (θ, φ) is
Q (θ, φ) = [a cos θ b sin θ cos φ b sin θ sin φ] 0 < θ < π
0 < φ < 2π . . . (5.8)

49
Geometric Modeling

Figure 5.11 : Biparametric Surface of Revolution

If a = b = r, then above equation reduces for a sphere. An ellipsoid of revolution is shown


in Figure 5.12(b).

(a) (b)
Figure 5.12 : Surfaces of Revolution (a) Sphere; and (b) Ellipsoid

where 0 < θ < 2π, 0 < φ < 2π. If a = b = r, Eq. (5.12) yields a torus with a circular cross
section.
If a ≠ b, then a torus with an elliptical cross section results. Figure 5.14 shows both a
circular and an elliptical cross section torus.
A paraboloid of revolution is obtained by rotating the parametric parabola
x = at2 0 < t < Tmax
y = 2at
about the x-axis. The parametric surface is given by
Q (t, φ) = [at2 2at cos φ 2at sin φ] 0 < t < Tmax . . . (5.9)
0 < φ < 2π
A hyperboloid of revolution is obtained by rotating the parametric hyperbola
x = a sec t 0 < t < tmax . . . (5.10)
y = b tan t
about the x-axis. The parametric surface is given by
Q (t, φ) = [a sec t b tan t cos φ b tan t sin φ] 0 < t < tmax
0 < θ < 2π . . . (5.11)
Examples are shown in Figure 5.13.

50
Surface Modeling

(a) (b)
Figure 5.13 : Surfaces of Revolution : (a) Paraboloid; and (b) Hyperboloid

If the axis of rotation does not pass through the center of a complete circle or ellipse, then
rotation about the axis generates a torus with a circular or elliptical cross section as
appropriate. Noting that the parametric equation of a non-origin-centered ellipse in the xy
plane is
x = h + a cos θ 0 < θ < 2π
y = k + b sin θ
where (h, k) are the x and y coordinates of the center of the ellipse. The parametric
equation for any point on the torus is
Q (θ, φ) = [h + a cos θ (k + b sin θ) cos φ (k + b sin θ) sin φ] . . . (5.12)

(a) (b)

Figure 5.14 : (a) Circular Cross-section; and (b) Elliptical Cross-section

Any synthetic curve such as cubic spline, parabolically blended, Bezier and B-spline
curves can also be rotated to generate surface of revolution. Figure 5.14 shows a surface
of revolution created using a relatively simple parabolically blended curve. A parametric
space curve in the matrix form is :
P(u) = [T] [N] [G]
where [T], [N] and [G] are parameter, blending function and geometry matrices,
respectively. The general form of the matrix equation for a surface of revolution is
Q(u, φ) = [T] [N] [G] [S] . . . (5.13)
where [S] represents the contribution due to rotation about an axis by the angle π. For a
specific case of rotation about the x-axis,

⎡1 0 0 0⎤
⎢ 0 cos φ sin φ 0 ⎥⎥
[S ] = ⎢ . . . (5.14)
⎢0 0 0 0⎥
⎢ ⎥
⎣0 0 0 1⎦

51
Geometric Modeling

(a) (b)
Figure 5.15 : Parabolically Blended Surface of Revolution : (a) Generating Curve; and (b) Surface

Rotate about the y-axis by + 90° to make the a-axis coincident with the x-axis.
The above three steps are needed only to determine the inverse transformations required
to place the surface of revolution correctly in three space. Having generated the surface
of revolution by rotation about the x-axis, the following three steps correctly place it in
three space :
Translate in x to place the center of the surface of revolution at the correct
location on the a-axis.
Apply the inverse of the combined rotation transformations to the surface of
revolution.
Perform the inverse of the translation of the point a0 to the surface of revolution.
A point on the surface of revolution is then given by

Q (t , φ) [Q ] [Tr ] [ R y ]−1 [ R y ]−1 [ Rx ]−1 [Tr ]−1 . . . (5.15)

where Rx = Rotation matrix about x-axis,


Ry = Rotation matrix about y-axis, and
Tr = Transformation.

5.4 SWEEP SURFACES


A three-dimensional surface is also obtained by traversing an entity, e.g. a line, polygon
or curve, along a path in space. The resulting surfaces are called sweep surfaces. Sweep
surface generation is frequently used in geometric modeling. The simplest sweep entity is
a point. The result of sweeping a point along a path is, of course, not a surface but a
space curve. However, it serves to illustrate the fundamental technique.
Consider the position vector P [x y z 1] swept along the path represented by the sweep
transformation [Ts]. The position vector Q (s) representing the resulting curve is
Q (s) = P [Ts] s1 < s < s2 . . . (5.16)
The transformation [Ts] determines the shape of the curve. For example, if the path is a
straight line of length n parallel to the z-axis, then
⎡1 0 00⎤
⎢0 1 0 0 ⎥⎥
[Ts ] = ⎢ 0 ≤ s ≤1
⎢0 0 1 0⎥
⎢ ⎥
⎣0 0 ns 1 ⎦
If the path is an origin-centered circle in a z = constant plane, then (see Eq. 5.14)
⎡⎛ r ⎞ ⎤
⎢⎜ x ⎟ cos {2π ( s + si )} 0 0 0⎥
⎢ ⎝ ⎠ ⎥
⎢ ⎛r⎞ ⎥
[Ts ] = ⎢ 0 ⎜ ⎟ sin {2π ( s + si )} 0 0⎥ 0 ≤ s ≤1
⎢ ⎝ y⎠ ⎥
⎢ 0 0 1 0⎥
⎢ ⎥
⎢⎣ 0 0 0 1 ⎥⎦
52
Surface Modeling
where si = (1/2π) tan–1 (yi/xi) and for P [x y z 1], r = x 2 + y 2 . Here, the subscript i is
used to indicate the initial or starting point.
Complex paths can be developed by combining simple paths. For example, combining
the two previous path transformations yields a single turn of a helical path along the
z-axis, i.e.,

⎡⎛ r ⎞ ⎤
⎢⎜ x ⎟ cos {2π ( s + si )} 0 0 0⎥
⎢⎝ ⎠ ⎥
⎢ ⎛r⎞ ⎥
[Ts ] = ⎢ 0 ⎜ ⎟ sin {2π ( s + si )} 0 0⎥
⎢ ⎝ y⎠ ⎥
⎢ 0 0 1 0⎥
⎢ ⎥
⎢⎣ 0 0 ns 1 ⎥⎦

The simplest sweep surface is obtained by traversing a line segment along a path.
Recalling that the parametric equation of a line segment is
P (u) = P1 + (P2 – P1) u 0<u<1 . . . (5.17)
The corresponding sweep surface is given by
Q (u, s) = P (u) [T (s)] 0 < t < 1, s1 < s < s2 . . . (5.18)
where again [Ts] is the sweep transformation. If the sweep transformation contains only
translations and/or local or overall scaling, the resulting surface is planar. If the sweep
transformation contains rotations, the resulting surface is non-planar. Figure 5.16 shows
the helical sweep surface obtained by simultaneously translating along and rotating about
the x-axis a line originally parallel to the y-axis. An example more fully explains the
technique.

Figure 5.16 : A Helical Sweep Surface

Parametric curves, e.g., cubic splines, parabolically blended, Bezier and B-spline curves,
are also used to generate sweep surfaces. Figure 5.16 shows a sweep surface generated
from a single cubic spline curve segment swept parallel to the z-axis.

53
Geometric Modeling

(a) (b)
Figure 5.17 : A Cubic Spline Based Sweep Surface : (a) Curve; and (b) Surface

In addition to open curves, closed polygons and curves are used to create sweep surfaces.
If the end surfaces are included, then the sweep surface encloses a finite volume. Many
geometric modeling systems create primitive volumes in this way. A square or rectangle
swept along a straight path yields a rectangular parallelepiped. A circle swept along a
straight path yields a cylinder. A circle of decreasing radius swept along a straight path
yields a cone. Rotation about the sweep axis is also possible. Figure 5.18 shows the
sweep surface resulting from a plane square perpendicular to and centered on the x-axis
being swept along and simultaneously rotated through 90° about the x-axis. In sweeping
a planar polygon or closed curve along an arbitrary path there are two important
considerations. The first is, what point in the polygon continuously lies on the path? In
general, any point in a polygon or on a closed curve can continuously lie on the path. For
different points, the resulting surfaces are different.

Figure 5.18 : Sweep Surface Generated by a Square Simultaneously Sweeping


along and Rotating about the x-axis
Example 5.1 : Simple Surface of Revolution
Consider the line segment with end points P1 [1 1 0] and P2 [6 2 0] lying in the
xy-plane. Rotating the line about the x-axis yields a conical surface. Determine the
point on this surface at u = 0.5, φ = π/3.
The parametric equation for the line segment from P1 to P2 is
P(u) = [x(u) y(u) z(u)] = P1 + (P2 − P1) u 0<u<1
∴ x(u) = x1 + (x2 – x1) u = 1 + 5u
y(u) = y1 + (y2 – y1) u = 1 + u
z(u) = z1 + (z2 – z1) u = 0
∴ The point Q (1/2, π/3) on the surface of revolution is
Q (1/2, π/3) = [1 + 5t (1 + t) cos φ (1 + t) sin φ]
⎡7 3 ⎛π⎞ 3 ⎛ π ⎞⎤
=⎢ cos ⎜ ⎟ sin ⎜ ⎟ ⎥
⎣2 2 ⎝3⎠ 2 ⎝ 3 ⎠⎦
⎡7 3 3 3 ⎤
=⎢ ⎥ = [3.5 0.75 1.3]
⎣2 2 4 ⎦
Example 5.2 : Parabolically Blended Surface of Revolution
Consider the parabolically blended curve defined by the points P1 [0 1 0],
P2 [2 3 0], P3 [4 1 0], P4 [5 2 0]. Rotate this curve about the x-axis through 360o to
obtain a surface of revolution. Calculate the surface point at u = 0.5 and
φ = 60o = π/3.
54
Using Eqs.(5.13) and (5.14), the parametric equation of the surface of revolution is Surface Modeling

Q (u, φ) = [T] [A] [G] [S]


Substituting the value of [S], [T], [A] and [G]
⎡ −1 3 −3 1 ⎤ ⎡ 0 1 0 1⎤ ⎡1 0 0 0⎤
⎢ 2 −5 4 −1⎥ ⎢ 2 3 ⎥ ⎢
0 1⎥ ⎢ 0 cos φ sin φ 0 ⎥⎥
⎛1⎞ 3 2
Q (t , φ) = ⎜ ⎟ [t t t 1] ⎢ ⎥⎢ ×
⎝2⎠ ⎢ −1 0 1 0 ⎥ ⎢ 4 1 0 1⎥ ⎢ 0 0 0 0⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎣ 0 2 0 0 ⎦ ⎣5 2 0 1⎦ ⎣0 0 0 1⎦

⎡ −1 7 0 1⎤ ⎡1 0 0 0⎤
⎢ 1 −11 ⎥ ⎢
0 1⎥ ⎢ 0 cos φ sin φ 0 ⎥⎥
⎛1⎞ 3 2
Q (t , φ) = ⎜ ⎟ [t t t 1] ⎢
⎝2⎠ ⎢4 0 0 1⎥ ⎢ 0 0 0 0⎥
⎢ ⎥⎢ ⎥
⎣4 6 0 1⎦ ⎣ 0 0 0 1⎦

For t = 0.5 and φ = π/3 (60o)

⎡ −1 7 0 1⎤ ⎡1 0 0 0⎤
⎢ 1 −11 ⎢ ⎥
⎛ 1 ⎞ ⎡1 1 1 ⎤ ⎢ 0 1⎥⎥ ⎢ 0 1/ 2 3 / 2 0⎥
Q (0.5, π / 3) = ⎜ ⎟ ⎢ 1⎥
⎝ 2 ⎠ ⎣8 4 2 ⎦ ⎢4 0 0 1⎥ ⎢ 0 0 0 0⎥
⎢ ⎥⎢ ⎥
⎣4 6 0 1⎦ ⎢⎣ 0 0 0 1 ⎥⎦

⎡ 49 33 33 3 ⎤
= ⎢ 1⎥ = [3.0625 1.03125 1.786181 1]
⎣ 16 32 32 ⎦

The resulting surface could be the design of a bowl or even a wind tunnel or rocket
nozzle.
Example 5.3 : Line Sweep Surface
Consider the line segment in the xy-plane and parallel to the y-axis defined by end
points P1 [0 0 0] and P2 [0 3 0 ]. Determine the point at t = 0.5, s = 0.5 on the
sweep surface generated by simultaneously translating the line 10 units along the
x-axis and rotating it through 2π about the x-axis.
Here the sweep transformation matrix is a translation followed by a rotation given
by :

⎡1 0 0 0⎤
⎢ 0 cos (2π s ) sin (2π s ) 0 ⎥⎥
[T ( s )] = ⎢
⎢ 0 − sin (2π s ) cos (2π s ) 0⎥
⎢ ⎥
⎣ls 0 0 1⎦

The parametric equation of the line segment is


P (u) = P1 + (P2 – P1) t = [0 0 0 1] + [0 – 0 3 – 0 0 – 0 1 – 1] t
= [0 3t 0 1]
The sweep surface is given by
Q (t, s) = [P (t)] [T (s)]

⎡1 0 0 0⎤
⎢ 0 cos (2π s ) sin (2π s ) 0 ⎥⎥
= [0 3t 0 1] ⎢
⎢ 0 − sin (2π s ) cos (2π s ) 0⎥
⎢ ⎥
⎣ls 0 0 1⎦
55
Geometric Modeling ⎡1 0 0 0⎤
⎢ 0 −1 0 0 ⎥⎥
and Q(0.5,0.5) = [0 1.5 0 1] ⎢
⎢ 0 0 −1 0⎥
⎢ ⎥
⎣5 0 0 1⎦

= [5 – 1.5 0 1]
Example 5.4 : Cubic Spline Sweep Surface
Sweep the normalized cubic spline curve segment defined by P1 [0 3 0 1],
P2 [3 0 0 1], P '1[3 0 0 0], P '2 [3 0 0 0] 10 units along the z-axis.
The sweep surface is given by
Q (u, s) = [C (u)] [T (s)] 0<u<1 0<s<1
The normalized cubic spline segment is given by
⎡ 2 −2 1 1 ⎤ ⎡0 3 0 1⎤
⎢ −3 3 − 2 1 ⎥⎥ ⎢⎢ 3 0 0 1 ⎥⎥
C (t ) = [t t t 1] ⎢
3 2
⎢0 0 1 0⎥ ⎢3 0 0 0⎥
⎢ ⎥⎢ ⎥
⎣1 0 0 0⎦ ⎣3 0 0 0⎦
The sweep transformation is
⎡1 0 00⎤
⎢0 1 0 0 ⎥⎥
[T ( s )] = ⎢
⎢0 0 1 0⎥
⎢ ⎥
⎣0 0 ns 1 ⎦
⎡0 6 0 0 ⎤ ⎡1 0 0⎤
0
⎢ 6 −9 0 0 ⎥⎥ ⎢⎢ 0 1 0 ⎥⎥
0
Hence, Q (t , s ) = [t 3 t 2 t 1] ⎢
⎢3 0 0 0⎥ ⎢0 0 1 0⎥
⎢ ⎥⎢ ⎥
⎣0 3 0 1 ⎦ ⎣0 0 10 s 1 ⎦
For t = 0.5, s = 0.5
⎡0 6 0 0 ⎤ ⎡1 0 0 0⎤
⎢ 6 −9 0 0 ⎥⎥ ⎢⎢ 0 1 0 0 ⎥⎥
Q (0.5, 0.5) = [0.125 0.25 0.5 1] ⎢
⎢3 0 0 0⎥ ⎢0 0 1 0⎥
⎢ ⎥⎢ ⎥
⎣0 3 0 1 ⎦ ⎣0 0 10 s 1 ⎦
= [3 1.5 5 1]
SAQ 1
In the variation diminishing property, what if you have a line or a plane that
passes through a control point or contains a line segment of the control polyline?
Suggest a proper counting of intersection points and verify your claim with
examples.

Bezier Surface
A tensor product Bezier surface is an extension of the Bezier curve in two
parametric directions u and v.
A Bézier surface is defined by a two-dimensional set of control points pi,j, where i
is in the range of 0 and m, and j is in the range of 0 and n. Thus, in this case, we
have m + 1 rows and n + 1 columns of control points and the control point on the i-
th row and j-th column is denoted by pi,j. Note that we have (m + 1) (n + 1) control
points in total.
56
Surface Modeling
⎡ P00 P01 P02 ..... Pn0 ⎤
⎢P P11 P12 ..... ..... ⎥⎥
⎢ 10
⎢P ..... ..... ..... ..... ⎥
[ Pij ] = ⎢ 20 ⎥
⎢ ..... ..... ..... ..... ..... ⎥
⎢ ..... ..... ..... ..... ..... ⎥
⎢ ⎥
⎣⎢ Pm0 ..... ..... ..... Pmn ⎦⎥
An orderly set of data or control points [Pij] is used to build-up a topologically
rectangular surface as shown in Figure 5.19.
The surface equation of a Bézier surface defined by m + 1 rows and n + 1 columns
of control points :
m n
p (u , v) = ∑∑ B
i =0 j =0
m ,i (u ) Bn , j (v ) pij . . . (5.19)

0 < u < 1, 0 < v < 1


where Bmi (u) and Bn,j (v) are the i-th and j-th Bézier basis functions in the u- and
v- directions, respectively. Recall from the discussion of Bézier curves, these basis
functions are defined as follows :
m!
Bm,i (u ) = u i (1 − u ) m −i . . . (5.20)
i !(m − i )!
n!
Bn, j (v) = vi (1 − v) n −i . . . (5.21)
j !(n − j )!

Figure 5.19 : Bezier Surface


P (u, 0) is any point on the surface and Pij are control points. These points form the
vertices of control or characteristic polyhedron as shown by dotted lines in Figure
5.19. Since Bm,i (u) and Bn,j (v) are degree m and degree n functions, we shall say
this is a Bézier surface of degree (m, n). The set of control points is usually
referred to as the Bézier net or control net. Note that parameters u and v are in the
range of 0 and 1 and hence a Bézier surface maps the unit square to a rectangular
surface patch.
Basis Functions
The basis functions of a Bézier surface are the coefficients of control points. From
the definition, it is clear that these two-dimensional basis functions are the product
of two one-dimensional Bézier basis functions and consequently the basis
functions for a Bézier surface are parametric surfaces of two variables u and v
defined on the unit square. Figure 5.20 shows the basis functions for control
57
Geometric Modeling

(a) (b)

Figure 5.20 : Basis Functions for Various Control Points

points p0,0 (Figure 5.20(a)) and p1,1 (Figure 5.20(b)), respectively. For control
point p0,0, its basis function is the product of two one-dimensional Bézier basis functions
B2,0 (u) in the u direction and B2,0 (v) in the v direction. In Figure 5.20(a), both B2,0 (u) and
B2,0 (v) are shown along with their product. Figure 5.20(b) shows the basis function for
p1,1, which is the product of B2,1 (u) in the u direction and B2,1 (v) in the v direction.
Tensor Product Surfaces
The tensor product technique constructs surfaces by “multiplying” two curves.
Given two Bézier, B-spline or NURBS curves, the tensor product method
constructs a surface by multiplying the basis function of the first curve with the
basis function of the second and use the results as the basis function for a set of
two-dimensional control points. Surfaces generated this way are called tensor
product surfaces. Therefore, Bézier surfaces, B-spline surfaces and NURBS
surfaces are all tensor product surfaces.
Important Properties
Several important properties of Bézier surfaces are listed here. These properties
can be proved easily by applying the same techniques used for Bézier curves.
Please compare these important properties with those of Bézier curves. Recall the
equation of a Bézier surface :
m n
p (u , v) = ∑∑ B
i =0 j =0
m ,i (u ) Bn , j (v ) pij

where the two one-dimensional basis functions are defined as follows :


m!
Bm,i (u ) = u i (1 − u ) m −i
i !(m − i )!

n!
Bn , j (v) = vi (1 − v) n −i
j !(n − j )!

• p (u, v) passes through the control points at the four corners of the control
net : p0,0, pm,0, pm,n and p0,n.
• In fact, we have p (0, 0) = p0,0, p (1, 0) = pm,0, p (0, 1) = p0,n and
p (1, 1) = pm,n.
• Non-negativity : Bm,i(u) Bn,j (v) is nonnegative for all m, n, i, j and u and v in
the range of 0 and 1.
This is obvious.
• Partition of Unity : The sum of all Bm,i (u) Bn,j (v) is 1 for all u and v in the
58 range of 0 and 1.
More precisely, this means for any pair of u and v in the range of 0 and 1, the Surface Modeling
following holds :
m n

∑∑ B
i =0 j =0
m ,i (u ) Bn , j (v ) =1 . . . (5.22)

• Convex Hull Property : A Bézier surface p(u, v) lies in the convex hull
defined by its control net.
Since p(u, v) is the linear combination of all of its control points with
positive coefficients whose sum is 1 (partition of unity), the surface lies in
the convex hull of its control points.
• Affine Invariance : This means that to apply an affine transformation to a
Bézier surface one can apply the transformation to all control points and the
surface defined by the transformed control points is identical to the one
obtained by applying the same transformation to the surface’s equation.
• Variation Diminishing Property : No such thing exists for surfaces.
Isoparametric curves on a Bézier surface, in fact on any tensor product surface,
have a very simple structure. In the equation of a Bézier surface, basis function Bm,i
(u) only depends on the index i and can be taken out of the summation in j. Thus,
the equation has the following form :
m ⎛ n ⎞
p (u , v ) = ∑ Bm,i (u ) ⎜
⎜ ∑B n , j (v ) pij ⎟

. . . (5.23)
i =0 ⎝ j =0 ⎠
The expression in the parenthesis involves basis functions Bn,j (u) and control
points pi,j. Note that the basis functions do not depend on i; but the control points
do. Therefore, we can define a new function qi (v) to reflect this fact :
n
qi (v) = ∑B
j =0
m ,i (v ) pij

Obviously, each qi (v) is a Bézier curve defined by control points pi0, pi1, . . . , pin
(i.e., the i-th row of control points). As a result, we have m + 1 new points q0(v),
q1 (v),. . . , qm (v). Since v is fixed and can be considered as a constant, points
q0 (v), q1 (v), . . . , qm(v) will not change positions as u changes. Consequently, the
surface equation becomes
m
p (u , v) = ∑B
i =0
m ,i (u ) qi ( v )

Since v is fixed, p(u, v) is actually a single variable parametric equation in u and


hence represents a curve on the surface. This is a Bézier curve in u defined by
m + 1 control points q0 (v), q1 (v), . . . , qm(v).
Therefore, we conclude that any isoparametric curve with v fixed is a Bézier curve
defined by a set of control points that can be computed from the equation of the
surface. Interchanging the role of u and v, we will have the same conclusion for
isoparametric curves in the v direction. Figure 5.21 shows isoparametric curves on
a Bézier surface in both directions.

59
Geometric Modeling

Figure 5.21 : Isoparametric Curves on Bezier Surface

There are four special isoparametric curves : p (0, v), p (1, v), p (u, 0) and p (u, 1).
These are the boundary curves because they map the boundary of the unit square
(i.e., the domain of the surface) to the surface. Setting u to 0 and 1 and setting v to
0 and 1 yield the following equations of the boundary curves :
n
p (0, v) = ∑B
j =0
n , j (v ) p0 j . . . (5.23a)

n
p(1, v) = ∑B
j =0
n , j (v) pm j . . . (5.23b)

m
p (u ,0) = ∑B
i =0
m ,i (u ) pi 0 . . . (5.23c)

m
p (u ,1) = ∑B
i =0
m ,i (u ) pin . . . (5.23d)

Therefore, the boundary curve corresponding to u = 0 and u = 1 are Bézier curves


defined by the 0-th row and the m-th row of the given control points. Similarly, the
boundary curve corresponding to v = 0 and v = 1 are Bézier curves defined by the
0-th column and the n-th column of the given control points.
The u-direction and v-direction
We know that the number of control points are organized into m + 1 rows and
n + 1 columns. What is the relationship between rows and columns and the
u-direction and v-direction? Recall that the v-direction is the curve with u fixed to
a constant. In this case, the definition can be rewritten as the following:
m ⎛ n ⎞
p (u , v ) = ∑ Bm,i (u ) ⎜
⎜ ∑ Bn , j (v) pij ⎟

i =0 ⎝ j =0 ⎠
Therefore, as v changes, the expression in the parenthesis defines a Bézier curve
with control points pi,0, pi,1, . . . , pi,n. These are exactly the control points on row i.
Therefore, the v-direction curve runs horizontally and by a similar argument we
know that the u-direction curve runs vertically. As examples, boundary curves
p(0, v) and p(1, v) are in the v-direction and are defined by row 0 and row n,
respectively, and boundary curves p(u, 0) and p(u, 1) are in the u-direction and are
defined by column 0 and column m, respectively.
The Bezier surfaces can also be shown in Tensor product form. If we arrange the
control points into a matrix of m + 1 rows and n + 1 columns
60
Surface Modeling
⎡ p0,0 p0,1 " p0, n ⎤
⎢p p1,1 " p1, n ⎥⎥
⎢ 1,0
⎢ # % # ⎥
⎢ ⎥
⎣⎢ pm ,0 pm ,1 " pm ,n ⎦⎥

and the basis functions of the v-direction Bézier curve into a column matrix of
n + 1 rows
⎡ Bn ,0 (v ) ⎤
⎢ B (v ) ⎥
⎢ n ,1 ⎥
⎢ # ⎥
⎢ ⎥
⎣⎢ Bn , n (v ) ⎦⎥
then the result of the parenthesis can be rewritten as a matrix product :
⎡ p0,0 p0,1 " p0, n ⎤ ⎡ Bn ,0 (v ) ⎤
⎢p p1,1 " p1, n ⎥⎥ ⎢ B (v ) ⎥
⎢ 1,0 . ⎢
n ,1 ⎥
⎢ # % # ⎥ ⎢ # ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣ pm,0 pm ,1 " pm ,n ⎥⎦ ⎢⎣ Bn , n (v) ⎥⎦

In this matrix form, the result is a column matrix of m + 1 entries. If we further


make the basis functions of the u-direction Bézier curve into a row matrix of m + 1
entries :
⎡⎣ Bm,0 (u ), Bm,1 (u ),. . . , Bm ,m (u ) ⎤⎦

The equation of a Bézier curve becomes the product of three matrices as follows :
⎡ p0,0 p0,1 " p0, n ⎤ ⎡ Bn ,0 (v) ⎤
⎢p p1,1 " p1,n ⎥⎥ ⎢ B (v ) ⎥
p (u , v) = ⎡⎣ Bm ,0 (u ), Bm,1 (u ),...., Bm ,m (u ) ⎤⎦ . ⎢ .⎢ ⎥
1,0 n ,1
⎢ # % # ⎥ ⎢ # ⎥
⎢ ⎥ ⎢ ⎥
⎣⎢ pm ,0 pm ,1 " pm ,n ⎦⎥ ⎣⎢ Bn ,n (v) ⎦⎥
Therefore, we have successfully converted the definition of a Bézier surface to a
product form. Since the entities of the control points matrix are matrices (i.e., each
control point can be considered as a vector and hence a matrix), this is the tensor
product form in mathematics. As a result, Bézier surfaces are tensor product
surfaces.
de Casteljau’s Algorithm
de Casteljau’s algorithm can be extended to handle Bézier surfaces. More
precisely, de Casteljau’s algorithm can be applied several times to find the
corresponding point on a Bézier surface p(u, v) given (u, v).
Recall that the equation of a Bézier surface
m n
p (u , v) = ∑∑ B
i =0 j =0
m ,i (u ) Bn , j (v ) pij

can be rewritten as
m ⎛ n ⎞
p (u , v ) = ∑ Bm,i (u ) ⎜
⎜ ∑B n ,i (u ) Bn , j (v ) pij ⎟

. . . (5.24)
i =0 ⎝ j =0 ⎠
For i = 0, 1, ..., m, define qi (v) as follows :
n
qi (v) = ∑B
j =0
n , j (v ) pij . . . (5.25)

61
Geometric Modeling For a fixed v, we have m + 1 points q0 (v), q1 (v), . . . , qm (v). Each qi (v) is a point
on the Bézier curve defined by control points pi0, pi1, . . . , pin. Plugging these back
into the surface equation yields
n
p (u , v) = ∑B
i =0
m ,i (u ) qi (v ) . . . (5.26)

This means p(u, v) is a point of the Bézier curve defined by m + 1 control points
q0 (v), q1 (v), . . . , qm(v). Thus, we have the following conclusion :
To find point p(u, v) on a Bézier surface, we can find m + 1 points
q0 (v), q1 (v), . . . , qm (v) and then from these points find p(u, v).
This conclusion gives us a simple way for computing p(u, v) given (u, v). Here is
why. Since each qi (v) is a point on the Bézier curve defined by the i-th row of
control points : pi0, pi1, . . . , pin. Therefore, for the i-th row and a given v, we can
apply de Casteljau’s algorithm for Bézier curve to compute qi (v). After m + 1
applications of de Casteljau’s algorithm (i.e., one for each row), we shall have
q0(v), q1(v), ..., qm(v) in hand. Then, applying de Casteljau’s algorithm to these
m + 1 control points again with u yields the final point p(u, v) on the surface!
Figure 5.22 illustrates this concept. The given surface is a degree (2, 2) Bézier
surface defined by a 3 × 3 control net. Suppose u = 2/3 and v = 1/3. To determine
q0 (1/3), we take the 0-th row of control points p00, p01 and p02 and apply
de Casteljau’s algorithm to this Bézier curve with v = 1/3. Repeat this for the first
row and the second row with v = 1/3. This yields three intermediate control points
q0 (1/3), q1 (1/3) and q2 (1/3). Finally, apply de Casteljau’s algorithm to these three
new control points with u = 2/3. The result is p(2/3,1/3).

Figure 5.22 : A 2 × 2 Bezier Surface


Finally, the following summarizes this algorithm :
Input : a m + 1 rows and n + 1 columns of control points and (u, v).
Output : point on surface p(u, v).
Algorithm : for i = 0 to m do
begin.
Apply de Casteljau’s algorithm to the i-th row of control points
with v;
Let the point obtained be qi (v);
end
Apply de Casteljau’s algorithm to q0 (v), q1 (v), . . . , qm (v) with u;
The point obtained is p(u, v);

62 Example 5.4 : A 3 × 3 Bezier Surface Computation


A cubic Bezier surface can be obtained by substituting n = 3 and m = 3 in Surface Modeling
Eqs. 5.19-5.26 (Figure 5.22)
3 3
P (u , v) = ∑ ∑ Pij Bi,3 (u ) B j ,3 (v) ; 0 ≤ u ≤ 1, 0 ≤ v ≤ 1
i =0 j =0

This equation can be expanded to give


3
P(u, v) = ∑B
i=0
i ,3 (u ) [Pi0 B0,3 (v) + Pi1 B1, 2 (v) + Pi2 B2, 3 (v) + Pi3 B3, 3 (v)]

= B0,3 (u) [P00 B0, 3 (v) + P01 B1, 3(v) + P02 B2, 3 (v) + P03 B3, 3 (v)]
+ B1, 3 (u) [P10 B0, 3 (v) + P11 B1, 3 (v) + P12 B2, 3 (v) + P13 B3, 3 (v)]
+ B2, 3 (u) [P20 B0, 3 (v) + P21 B1, 3 (v) + P22 B2, 3 (v) + P23 B3, 3 (v)]
+ B3, 3 (u) [P30 B0, 3 (v) + P31 B1, 3 (v) + P32 B2, 3 (v) + P33 B3, 3 (v)]
This equation can be written in a matrix form as

⎡ P00 P01 P02 P03 ⎤ ⎡ B0,3 (v) ⎤


⎢P ⎢ ⎥
P11 P12 P13 ⎥⎥ ⎢ B1,3 (v) ⎥
P (u , v) = [ B0,3 (u ) B1,3 (u ) B2,3 (u ) B3,3 (u )] ⎢ 10 ⎢ ⎥
⎢ P20 P23 ⎥

P21 P22
⎥ ⎢ B2,3 (v) ⎥
⎣ P30 P31 P32 P33 ⎦ ⎢ B (v ) ⎥
⎣ 3,3 ⎦

⎡ (1 − v) ⎤
⎢ 2⎥
⎢ 3v (1 − v ) ⎥
or P(u, v) = [(1 – u)3 3u (1 – u)2 u2 (1 – u) u3] [P] ⎢ 2 ⎥
⎢ 3v (1 − v) ⎥
⎢ ⎥
⎣ v3 ⎦
or P(u, v) = UT [MB] [P] [MB]TV
B B

where the subscript B denotes Bezier and

⎡ P00 P01 P02 P03 ⎤


⎢P P11 P12 P13 ⎥⎥
[ P] = ⎢ 10
⎢ P20 P21 P22 P23 ⎥
⎢ ⎥
⎣ P30 P31 P32 P33 ⎦

⎡ −1 3 − 3 1⎤
⎢ 3 −6 3 0 ⎥⎥
[MB] = ⎢
⎢ −3 3 0 0⎥
B

⎢ ⎥
⎣1 0 0 0⎦

and the U and V vectors are [u3 u2 u 1]T respectively. Notice that [MB] is the same B

matrix for the cubic Bezier curve.


UT [MH] [B] [MH]TV = UT [MB] [P] [MB]TV B B

[MH] [B] [MH] = [MB] [P] [MB]T B B

or Solving for [B] gives [MH]− 1. This equation can be reduced to give

63
Geometric Modeling
⎡ P00 P03 3( P01 − P00 ) 3( P03 − P02 ) ⎤
⎢ P30 P33 3( P31 − P30 ) 3( P33 − P32 ) ⎥
[ B] = ⎢ ⎥
⎢ 3( P10 − P00 ) 3( P13 − P03 ) 9( P00 − P10 − P01 + P11 ) 9( P02 − P12 − P03 + P13 ) ⎥
⎢ ⎥
⎣3( P30 − P20 ) 3( P33 − P23 ) 9( P20 − P21 − P30 + P31 ) 9( P22 − P23 − P32 + P33 ) ⎦
Comparing this equation with Equation for the bicubic patch reveals that the
tangent and twist vectors of the Bezier surface are expressed in terms of the
vertices of its characteristic polyhedron.
⎡ P00 P01 " P0 m ⎤ ⎡ B0,m (v) ⎤
⎢P ⎢ ⎥
P11 " P1m ⎥⎥ ⎢ B1,m (v) ⎥
∴ P(u, v) = [B0,n (u) B1, n (u) . . . Bn,n (u)] ⎢ 10
⎢ # # # ⎥⎢ # ⎥
⎢ ⎥⎢ ⎥
⎣ Pn 0 Pn1 " Pnm ⎦ ⎣⎢ Bn ,m (v) ⎦⎥

(a) Parametric Space (b) Cartesian Space


Figure 5.23 : A Cubic Bezier Patch
SAQ 2
(a) Given three control points on the xy-plane (– 1, 0), (0, 1) and (2, 0), do the
following :
(i) Write down its Bézier curve equation.
(ii) Expand this equation to its equivalent conventional form.
(iii) Since there are three control points, there are three Bézier coefficients.
Write down their equations and sketch their graphs.
(iv) Use your calculator to find enough number of points using the
conventional parametric form and sketch the curve.
(v) Find points on the curve that correspond to u = 0, 0.25, 0.5, 0.75 and
1 with the conventional form.
(vi) Use de Casteljau’s algorithm to find points on the curve
corresponding to u = 0, 0.25, 0.5, 0.75 and 1.
(vii) Subdivide the Bézier curve at u = 0.4 and list the control points of the
resulting curve segments.
(viii) Increase the degree of this curve to three and list the new set of
control points. Then, increase the degree to four and list the new set of
control points.
(b) A Bézier curve of degree 2 defined by three control points P0, P1 and P2 is a
portion of a conic section. What type of this conic section is it? Is it a
portion of a parabola, a hyperbola or an ellipse? You can assume the given
control points are in the xy-coordinate plane.
(c) Suppose Bézier curve C (u) (resp., D (u)) of degree n is defined by control
64 points P0, P1, . . . , Pn (resp., O0, Q1, . . . , Qn). If the curves are identical (i.e.,
C (u) = D (u) for every u in [0, 1]), then the corresponding control points are Surface Modeling
also identical (i.e., Pi = Qi for all 0 ≤ i ≤ n).
[Hint : First show that if (1 – u) A + u B is a zero vector for every u in
[0, 1], then A and B are both zero vectors. Then, work the
de Casteljau’s algorithm backward to show that Pi – Qi is a zero
vector for all 0 ≤ i ≤ n.]
(d) Suppose Bézier curve C (u) of degree n is defined by control points
P0 , P 1 , . . . , P n .
(i) Prove the following :
n
Bn ,i (u ) = ∑ (−1)
j =i
j −i
C (n, i )C (n − i, j − i )u j

(ii) Show that curve C (u) can be rewritten to the following matrix form :
m01 " m0 n ⎤ ⎡u ⎤
0
⎡ m00
⎢m ⎢ ⎥
m11 " m1n ⎥⎥ ⎢ u1 ⎥
C (u ) = [ P0 , P1 , . . . , Pn ] . ⎢ 10 .
⎢ # % # ⎥ ⎢#⎥
⎢ ⎥ ⎢ ⎥
⎣ mn 0 mn1 " mnn ⎦ ⎢u n ⎥
⎣ ⎦
where entry mij is defined as follows:
⎪⎧( −1) C (n, i )C (n − i, j − i )
j −i
if j ≥ i
mij = ⎨
⎪⎩ 0 otherwise
(e) Therefore, a Bézier curve can be rewritten using the traditional polynomial
form in u0 = 1, u1, u2, . . . , un. This is the so-called monomial form and the
basis functions are u0 = 1, u1, u2, . . . , un. However, the use of this monomial
form is computationally unstable.
(f) Show that the maximum of Bn,i (u) occurs at u = i/n and that the maximum
value is
n! i i ( n − i ) n −i
i !( n − i )! nn
(g) Verify the following results with your calculus knowledge :
(i) The derivative of Bn,i(u) :
d
Bn,i (u ) = Bn′ ,i (u ) = n ( Bn −1,i −1 (u ) − Bn −1,i (u ) )
du
(ii) The derivative of Bézier curve p(u) :
n −1

∑ (B
d
C (u ) = C ′ (u ) = n −1,i (u ) {n ( Pi +1 − Pi )}
du i =0

(h) The discussion of joining two Bézier curves with C1 – continuity assumes
the domain of the curves is [0, 1]. Suppose the domain of the first curve is
[0, s] and the domain of the second curve is [s, 1]. Redo the calculation.
What is your conclusion? Is there any modification required?
(i) Prove the following :
k
Dik = ∑ (−1)
j =0
k− j
C (k , j ) Pi + j

where Dik s are the k-th difference points and C (k ,j) is the binomial
coefficient defined as follows :
k!
C (k , j ) =
j !( k − j )!
65
Geometric Modeling With this formula, we can express a higher derivative using the original
control points rather than using finite difference points.
(j) After subdividing a Bézier curve of degree p at s, we have two Bézier curves
of degree p, one on interval [0, s] while the other on [s, 1]. Show that these
two curves are of C1 continuous at the joining point.
[Hint : Suppose the last two control points of the curve on [0, s] are Pp − 1
and Pp, and the first two control points of the curve on [s,1] are Q0
and Q1. Then, we have Pp − 1, Pp = Q0 and Q1 are on the same line,
and the ratio of the distance from Pp − 1 to Pp = Q0 and the distance
from Pp = Q0 to Q1 is equal to s due to subdivision. Now, change the
variables of both curves so that they have domain on [0, 1]. A
simple calculation will lead to the desired conclusion.]
(k) Derive the conditions for C0 and C1 continuity of a cubic Bezier composite
surface of two patches.

B-Splines Surface
A tensor product method for B-spline surface is similar to Bezier surface. It is an
extension of B-spline curve in two parameter definition in u and v.
A B-spline surface can be constructed from the following information :
(i) a set of m + 1 rows and n + 1 control points pi,j, where 0 ≤ i ≤ m and
0 ≤ j ≤ n;
(ii) a knot vector of h + 1 knots in the u-direction, U = {u0, u1, . . . , uh};
(iii) a knot vector of k + 1 knots in the v-direction, V = { v0, v1, . . . , vk };
(iv) the degree p in the u-direction; and
(v) the degree q in the v-direction;
The B-spline surface defined by the above information is the following :
m n
p (u , v ) = ∑∑ N
i =0 j =0
i , p (u ) N j , q (v ) pij . . . (5.27)

where Ni,p (u) and Nj,q (v) are B-spline basis functions of degree p and q,
respectively. Note that the fundamental identities, one for each direction, must
hold : h = m + p + 1 and k = n + q + 1. Therefore, a B-spline surface is another
example of tensor product surfaces. As in Bézier surfaces, the set of control points
is usually referred to as the control net and the range of u and v is 0 and 1. Hence,
a B-spline surface maps the unit square to a rectangular surface patch.
Figure 5.24 shows a B-spline surface defined by 6 rows and 6 columns of control
points.

Figure 5.24 : B-spline Surface with 6 × 6 Control Points


The knot vector and the degree in the u-direction are
U = {0, 0, 0, 0.25, 0.5, 0.75, 1, 1, 1} and 2.
66
The knot vector and the degree in the v-direction are Surface Modeling

V = {0, 0, 0, 0, 0.33, 0.66, 1, 1, 1, 1} and 3.


Basis Functions
The coefficient of control point pi,j is the product of two one-dimensional B-spline
basis functions, one in the u-direction, Ni,p (u), and the other in the v-direction,
Nj,q (v). All of these products are two-dimensional B-spline functions. Figure 5.25
shows the basis functions of control points p2,0, p2,1, p2,2, p2,3, p2,4 and p2,5.

Figure 5.25 : Basis Function of B-spline

The two-dimensional basis functions are shown as wire-frame surfaces. Since the
control points are on the same row, the basis function in the u-direction is fixed
while the basis functions in the v-direction change. Since B-spline basis functions
are in general non-zero only on a few consecutive knot spans (i.e., the local
modification scheme), the two-dimensional B-spline basis functions are non-zero
on the product of two, knot spans on which at least one one-dimensional basis
function is non-zero. This fact is shown clearly in Figure 5.25.
Clamped, Closed and Open B-spline Surfaces
Since a B-spline curve can be clamped, closed or open, a B-spline surface can also
have three types in each direction. That is, we could ask to have a B-spline surface
clamped in the u-direction and closed in the v-direction. If a B-spline is clamped in
both directions, then this surface passes through control points p0,0, pm,0, p0,n and
pm,n and is tangent to the eight legs of the control net at these four control points. If
a B-spline surface is closed in a direction, then all isoparametric curves in this
direction are closed curves and the surface becomes a tube. If a B-spline surface is
open in both directions, then the surface does not pass through control points p0,0,
pm,0, p0,n and pm,n.
This set of notes only concentrates on B-spline surfaces clamped in both
directions. Figure 5.26 shows three B-spline surfaces clamped, closed and open in
both directions. All three surfaces are defined on the same set of control points;
but, as in B-spline curves, their knot vectors are different.

67
Geometric Modeling

Figure 5.26 : (a) Clamped; (b) Closed; and (c) Open B-spline Surfaces

We now look at a few simple cases, before listing some of the interesting
properties of B-splines.
B-Spline Surface Case 1
Figure 5.27(a) shows a control mesh made up of 20 control points, n = 4 and
m = 3. The corresponding B-spline surface is plotted in wire-frame mode, showing
several isoparametric curves along the surface.

(a)
Figure 5.27 : A B-spline Surface (a) The Control Met
68
Surface Modeling

(b)
Figure 5.27 : A B-spline Surface (b) The Surface
B-spline Surface Case 2
This case shows two B-spline surfaces with the same underlying control mesh. The
first is a biquadric (that is, p = q = 2), while the second is biquartic
(n = p = 4). The U and V vectors are uniform (the only interior knot in each case is
at 0.5).
Notice how the lower degree surface is much closer to the control mesh, while the
higher degree surface is much “smoother”.

(a)

(b)
Figure 5.28 : (a) A Biquadratic Surface; and (b) A Biquartic Surface (p = q = 4)
using the Same Control Points as in Figure 5.22(a) 69
Geometric Modeling B-Spline Surface Case 3
The surface is continuously differentiable if the underlying B-spline curves are in
the interior of a knot span, the surface will be continuously differentiable arbitrary
number of times. What about the partial derivatives at a knot? For a knot of
multiplicity k, the surface is (partially) differentiable (p − k) times with respect to
u, and (q − k) times with respect to v.
Figure 5.29 shows a surface that is quadratic X cubic. At the knot u = ½, the curve
is differentiable k − p = 2 − 2 = 0 times. Hence the surface has a ‘crease’.

Figure 5.29 : A Quadratic x Cubic Surface with Crease, U = {0, 0, 0, ½, ½, 1, 1, 1} and


V = {0, 0, 0, 0, ½, 1, 1, 1, 1}

Important Properties
Several important properties of B-spline surfaces are listed here. These properties
can be proved easily by applying the same techniques used for Bézier curves.
Please compare these important properties with those of B-spline curves. Please
recall that the equation of a B-spline surface is the following
m n
p (u , v ) = ∑∑ N
i =0 j =0
i , p (u ) N j , q (v ) pij

where the degrees in the u- and v-directions are p and q, respectively, and there are
m + 1 rows and n + 1 columns of control points.
• Non-negativity : Ni,p (u) Nj,q (v) is non-negative for all p, q, i, j and u and v
in the range of 0 and 1.
This is obvious.
• Partition of Unity : The sum of all Ni,p (u) Nj,q (v) is 1 for all u and v in the
range of 0 and 1.
More precisely, this means for any pair of u and v in the range of 0 and 1,
the following holds :
m n

∑∑ N
i =0 j =0
j , q (v ) =1

• Strong Convex Hull Property : If (u, v) is in [ui, ui + 1) × [vj, vj + 1), then


p (u, v) lies in the convex hull defined by control points ph,k, where
i – p ≤ h ≤ i and j – q ≤ k ≤ j.
70
This strong convex hull property for B-spline surfaces follows directly from the Surface Modeling
strong convex hull property for B-spline curves. For the u-direction, if u is in
[ui, ui + 1), then there are at most p + 1 non-zero basis functions, namely, Ni,p (u),
Ni – 1,p (u), . . . , and Ni – p,p (u). Thus, only the control points on row i – p to row i
have non-zero basis functions in the u-direction. Similarly, if v is in [vj, vj + 1), there
are at most q + 1 non-zero basis functions on this knot span, namely
Nj,q (v), Nj – 1,q (v), . . . , and Nj – q,q (v). Thus, only the control points on column j – q
to column j have non-zero basis functions in the v-direction. Combining these two
facts together, only the control points in the range of row i – p to row i and column
j – q to q have non-zero basis functions. Since these basis functions are
non-negative and their sum is one (i.e., the partition of unity property), p (u, v) lies
in the convex hull defined by these control points.
As a result, the surface patch defined on rectangle [ui, ui + 1) × [vj, vj + 1) lies
completely in the same convex hull.
Local Modification Scheme : Ni,p (u) Nj,q (v) is zero if (u, v) is outside of the
rectangle [ui, ui + p + 1) × [vj, vj + q + 1).
From the local modification scheme property, we know that in the u-direction
Ni,p (u) is non-zero on [ui, ui + p + 1) and zero elsewhere. The local modification
scheme property of B-spline surfaces follows directly from the curve case. If
control point p3, 2 is moved to a new location, Figure 5.30 shows that only the
neighbouring area on the surface of the moved control point changes shape and
elsewhere is unchanged.

(a) Simple B-spline Surface

(b) B-spline with Local Modification


Figure 5.30
71
Geometric Modeling • p (u ,v) is C p–s (resp., C q–t) continuous in the u (resp., v) direction if
u (resp., v) is a knot of multiplicity s (resp., t).
• Affine Invariance : This means that to apply an affine transformation to a
B-spline surface one can apply the transformation to all control points and
the surface defined by the transformed control points is identical to the one
obtained by applying the same transformation to the surface’s equation.
• Variation Diminishing Property : No such thing exists for surfaces.
• If m = p, n = q, and U = {0, 0, . . . , 0, 1, 1, . . . , 1}, then a B-spline surface
becomes a Bézier surface.
de Boor’s Algorithm
Once you know de Casteljau’s algorithm for Bézier surfaces, de Boor’s algorithm
for B-spline surface and its modification for NURBS surfaces is only a small step
away. In fact, with the local modification property in hand, de Boor’s algorithm
looks very similar to de Casteljau’s algorithm. If the equation of a B-spline surface
is rewritten as follows :
m ⎛ n ⎞
p (u , v ) = ∑ N i , p (u ) ⎜
⎜ ∑N j , q (v ) pij ⎟

. . . (5.28)
i =0 ⎝ j =0 ⎠
then for a fixed i, the curve in the parenthesis is simply a B-spline curve defined by
the control points on row i. To simplify our discussion, let qi (v) be defined as
follows :
n
qi (v) = ∑N
j =0
j , q (v ) pij . . . (5.29)

Therefore, qi (v) is a point corresponding to v on the B-spline curve defined by the


control points of row i. If v is in knot span [vd, vd + 1), then only q + 1 control points
on row i are involved in the computation of qi (v), where q is the degree of Nj,q (v).
These control points are pi,d, pi,d – 1, . . . , pi,d – q, if v is not equal to vd. Otherwise, if
v is equal to vd, a knot of multiplicity t, then the involved control points are
pi,d – t, pi,d – t – 1, . . . , pi,d – q. Therefore, using the control points from column d-q to
column d-t, where t is zero if v is not a knot, we can apply de Boor's algorithm to
each row to obtain m + 1 new points q0 (v), q1 (v), . . . , qm (v). This is shown in
Figure 5.31.

Figure 5.31 : de Boor’s Algorithm


72
Plugging these new points back into the surface equation we have the following Surface Modeling

m
p (u , v ) = ∑N
i =0
i , p (u ) qi (v ) . . . (5.30)

Therefore, p (u ,v) is a point on the B-spline curve defined by


q0 (v), q1 (v), . . . , qm (v). As a result, to find p(u, v), what we need to do is to find
the point on this curve that corresponds to u. Hence, de Boor’s algorithm can be
used again for this purpose.
Let u be in knot span [uc, uc + 1). From the local modification property, only p + 1
control points will participate the computation, where p is the degree of the
B-spline curve. Thus, if u is not equal to uc, the involved points are
qc (v), qc – 1(v), . . . , qc – p(v). Otherwise, if u is equal to uc, a knot of multiplicity s,
the involved points are qc – s (v), qc – s – 1 (v), . . . , qc – p (v). Based on this observation,
even though each row of control points can produce a qi (v), not all of them are
needed. In fact, only p + 1 rows are needed. This is illustrated by
Figure 5.32.

Figure 5.32

In summary, given u in [uc, uc + 1) and v in [vd, vd + 1), p (u, v), for row i in the range
of c-p and c-s, applying de Boor’s algorithm to control points
pi,d – q, pi,d – q + 1, . . . , pi, d – t yields a new point qi (v). Then, apply de Boor’s
algorithm to qc – p (v), qc – p + 1 (v), . . . , qc – s (v) and the result is p (u ,v)!
The following summarizes the algorithm :
Input : A set of m + 1 rows and n + 1 columns of control points, knot vectors in
the u- and v-directions and (u ,v);
Output : Point on the surface p(u, v)
Algorithm
Let u be in [uc, uc + 1);
Let v be in [vd, vd + 1);
If u is not equal to uc, let s be zero; otherwise, let s be the multiplicity of uc;
If v is not equal to vd, let t be zero; otherwise, let t be the multiplicity of vd;
for i = c − p to c − s do
begin
Apply de Boor’s algorithm to control points pi, d – q, pi, d – q+ 1, . . . , pi, d – t with
respect to v;
Let the result be qi (v);
end
73
Geometric Modeling Apply de Boor’s algorithm to points qc – p (v), qc – p + 1 (v), . . . , qc – s (v) with
respect to u;
The point obtained is p (u, v);
Figure 5.32 shows an example. This B-spline surface is defined by 5 × 5 control
points and knot vector (in both directions) {0, 0, 0, 0, 0.5, 1, 1, 1, 1}. Thus, the
degree in both directions is 3.

Figure 5.33 : A B-spline Surface with 5 × 5 Control Points where u < 0.5 and v > 0.5
In this figure, both u and v are not knots and u is less than 0.5 while v is larger than
0.5. For this v, since it is in [0.5, 1), only control points pi, 1, pi, 2, pi, 3 and pi, 4 are
involved in de Boor’s algorithm computation. Since u is in [0, 0.5), in the
u-direction, only row 0, row 1, row 2 and row 3 are used.
Example 5.5
Find the equivalent bicubic formulation of an open and closed cubic B-spline
surface.
Solution
Most of the results we know can be extended to a cubic B-spline surface. First, let
us find the matrix form of Eq. (5.27). This equation is identical in form to the
Bezier surface equation

⎡ P00 P01 .... P0m ⎤ ⎡ N 0, l (v) ⎤


⎢P ⎢ ⎥
P11 .... P1m ⎥⎥ ⎢ N1, l (v) ⎥
P (u , v) = [ N0, k (u ) N1, k (u ) . . . N n, k (u )] ⎢ 10 ⎢ ⎥
⎢ # # # # ⎥
⎢ ⎥ ⎢ # ⎥
⎣ Pn0 Pn1 .... Pnm ⎦ ⎢ N m , l (v ) ⎥
⎣ ⎦
⎡ N 0, l (v) ⎤
⎢ ⎥
⎢ N1, l (v) ⎥
or P (u, v) = [ N0, k (u ) N1, k (u ) . . . N n, k (u )] [ P] ⎢ ⎥
⎢ # ⎥
⎢ N m , l (v ) ⎥
⎣ ⎦
where [P] is an (n + 1) × (m + 1) matrix of the vertices of the characteristic
polyhedron of the B-spline surface patch. For a 4 × 4 cubic B-spline patch,
equation becomes
⎡ P00 P01 P02 P03 ⎤ ⎡ N0,4 (v) ⎤
⎢P ⎢ ⎥
P11 P12 P13 ⎥⎥ ⎢ N1,4 (v) ⎥
P (u , v) = [ N0,4 (u ) N1,4 (u ) N 2,4 (u ) N3,4 (u )] ⎢ 10
⎢ P20 P21 P22 P23 ⎥ ⎢ N 2,4 (v) ⎥
⎢ ⎥⎢ ⎥
⎣ P30 P31 P32 P33 ⎦ ⎣⎢ N3,4 (v) ⎦⎥
74
For the open patch, the B-spline functions are the same as the Bernstein Surface Modeling
polynomials of the previous example and the equivalent bicubic formulation
results in. For, say, a 5 × 6 open cubic B-spline patch, we get

⎡ N 0,4 (v) ⎤
⎢ N (v ) ⎥
⎢ 1,4 ⎥
⎢ N 2,4 (v) ⎥
P(u , v) = [ N0,4 (u ) N1,4 (u ) N 2,4 (u ) N3,4 (u ) N 4,4 (u )][ P] ⎢ ⎥
⎢ N3,4 (v) ⎥
⎢ N 4,4 (v) ⎥
⎢ ⎥
⎢⎣ N5,4 (v) ⎥⎦

⎡ P00 P01 P02 P03 P04 P05 ⎤


⎢P P11 P12 P13 P14 P15 ⎥⎥
⎢ 10
where [ P] = ⎢ P20 P21 P22 P23 P24 P25 ⎥
⎢ ⎥
⎢ P30 P31 P32 P33 P34 P35 ⎥
⎢⎣ P40 P41 P42 P43 P44 P45 ⎥⎦

All the B-spline functions shown in this equation are calculated by following the
procedure of B-spline curve. After this is done, the above equation can be reduced
to

⎡ P11 (u , v) P12 (u, v) P13 (u , v) ⎤


⎢ 0 ≤ u ≤ 1, 0 ≤ u ≤ 1, 0 ≤ u ≤ 1, ⎥⎥

⎢ 0 ≤ v ≤ 1, 0 ≤ v ≤ 2, 0 ≤ v ≤ 3, ⎥
⎢ ⎥
⎢ P21 (u, v), P22 (u, v), P23 (u , v), ⎥
⎢1 ≤ u ≤ 2, 1 ≤ u ≤ 2, 1 ≤ u ≤ 2, ⎥
⎢ ⎥
⎣⎢ 0 ≤ v ≤ 1, 1 ≤ v ≤ 2, 2 ≤ v ≤ 3, ⎦⎥

⎡U T [ M S ][ P11 ][ M S ]T V U T [ M S ][ P12 ][ M S ]T V U T [ M S ][ P13 ][ M S ]T V ⎤


=⎢ ⎥
⎢⎣U T [ M S ][ P21 ][ M S ]T V U T [ M S ][ P22 ][ M S ]T V U T [ M S ][ P23 ][ M S ]T V ⎥⎦

where [P11], [P12], . . . , [P23] are partitions of [P]. Each partition is 4 × 4 and is
different from its neighbour (moving in the row direction of [P]) by one row or by
one column (moving in the column direction of [P]. The general form of any
partition is given by

⎡ P(i −1)( j −1) P(i −1) j P(i −1)( j +1) P(i −1)( j + 2) ⎤
⎢ ⎥
⎢ Pi ( j −1) Pij Pi ( j +1) Pi ( j + 2) ⎥
[ Pij ] = ⎢
⎢ P(i +1)( j −1) P(i +1) j P(i +1)( j +1) P(i +1)( j + 2) ⎥⎥
⎢P P(i + 2) j P(i + 2)( j +1) P(i + 2)( j + 2) ⎥⎦
⎣ (i + 2)( j −1)
The matrix [Ms] is the same as for cubic B-spline curves. It is given by

⎡ −1 3 −3 1⎤
⎢ 0 ⎥⎥
1 3 −6 3
[M s ] = ⎢
6 ⎢ −3 0 3 0⎥
⎢ ⎥
⎣1 4 1 0⎦

From the equations given above we can write a more concise form as
Pij (u, v) = UT [Ms] [Pij] [Ms]TV
1 ≤ i ≤ 2, 1 ≤ j ≤ 3; (i – 1) ≤ u ≤ I, (j – 1) ≤ v ≤ j 75
Geometric Modeling Equating the above equation with the bicubic equation, the equivalent [Bij] matrix B

becomes
[Bij] = [MH]− 1 [MS] [Pij] [MS]T [MH]T − 1
B

Notice that the above procedure can be extended to an n × m cubic B-spline


surface.
A similar procedure can be followed for a closed cubic B-spline patch. The
difference comes in the form of the B-spline functions. For a 4 × 4 cubic B-spline
patch closed in the u direction, or both directions, the following three equations
can be written respectively :
P(u, v) = [N0, 4 ((u + 4) mod 4, N0, 4 ((u + 3) mod 4), N0, 4 ((u + 2) mod 4),
⎡ N0,4 (v) ⎤
⎢ N (v ) ⎥
N0, 4 ((u + 1) mod 4)) × [ P] ⎢ ⎥
1,4
⎢ N 2,4 (v) ⎥
⎢ ⎥
⎢⎣ N3,4 (v) ⎥⎦
⎡ N 0,4 (v + 4) mod 4 ⎤
⎢ N (v + 3) mod 4) ⎥
P (u , v) = [ N 0,4 (u ) N1,4 (u ) N3,4 (u )][ P] ⎢ ⎥
0,4
⎢ N 0,4 (v + 2) mod 4) ⎥
⎢ ⎥
⎢⎣ N 0,4 (v + 1) mod 4) ⎥⎦
and P(u, v) = [N0, 4 ((u + 4) mod 4), N0, 4 ((u + 3) mod 4), N0, 4 (u + 2) mod 4],
⎡ N0,4 (v + 4) mod 4 ⎤
⎢ N (v + 3) mod 4) ⎥
N0, 4 ((u + 1) mod 4)] × [ P] ⎢ ⎥
0,4
⎢ N0,4 (v + 2) mod 4) ⎥
⎢ ⎥
⎢⎣ N0,4 (v + 1) mod 4) ⎥⎦
The closed B-spline functions have been evaluated as 5 × 6 closed cubic B-spline
patch, the above procedure is repeated but with the functions [N0, 4 ((u + 5) mod 5),
N0, 4 (u + 4) mod 5], N0, 4 ((u + 3) mod 5), N0, 4 ((u + 2) mod 5),
N0, 4 ((u + 1) mod 5)] and [N0, 4 ((u + 6) mod 6), N0, 4 (u + 4) mod 6],
N0, 4 ((u + 3) mod 6), N0, 4 ((u + 2) mod 6), N0, 4 (u + 1) mod 6)]. The control point
matrix [P] is a 5 × 6 matrix in the case of the open patch.
SAQ 3
(a) Given knot sequences U1 = {0, 0, 1, 1} and U2 = {0, 0, 0, 1, 1, 1}, use hand
calculation to verify that the B-spline basis functions on U1 and U2 are
identical to the Bézier basis functions.
(b) Show that a clamped B-spline curve passes through the first and last control
points. More precisely, show that C (0) = P0 and C (1) = Pn hold.
(c) In the discussion of forcing a B-spline to pass through a control point, we
indicated that if we let Pi = Pi − 1 = . . . = Pi – p + 1, the convex hull collapses to
a line segment Pi − p Pi and the curve must pass through Pi. Why is this so?
(d) In the discussion of forcing a B-spline to pass a control point, we indicated
that a point on the curve that corresponds to a knot may become identical to
the collapsed control point. If we let Pi = Pi − 1 = . . . = Pi – p + 1, will you be
able to identify the knot uk such that P (uk) becomes identical to Pi? Why?
Elaborate your finding.
(e) In the discussion of multiple knots, we mentioned that if a knot ui has
multiplicity k − 1, where k is the degree of a B-spline curve, then C (ui) lies
on a leg of the control polyline. Based on your understanding of multiple
knots, answer the following questions :
(i) Why does this proposition hold?

76 (ii) On which leg does C (ui) lie?


(f) Consider a clamped cubic B-spline curve defined by seven control points Surface Modeling
P0, . . . , P6 and knot vector U = {0, 0, 0, 0, 2/5, 3/5, 3/5, 1, 1, 1, 1}. Find its
derivative B-spline curve, its new control points and knot vector.
(g) Modify the derivative computation method so that it works for open and
closed B-spline curves.
(h) Use B-spline curves of degrees 2 and 3 and hand calculation to verify that
de Boor’s algorithms reduces to de Casteljau’s algorithm.
(i) Suppose we have a clamped B-spline curve of degree p defined by n + 1
control points and a knot vector of simple knots except for the first and last
knots which are of multiplicity p + 1. Derive a relation of the number of
control points between the given B-spline curve and the number of control
points of its Bézier curve segments.

Coons Surfaces
We have already encountered design tools that originated in car companies; Bezier
curves and surfaces were developed by Citroen and Renault in Paris. Two other
major concepts also emerged from the automotive field: Coons patches (Coons
consulted for Ford, Detroit) and Gordon surfaces (W. Gordon worked for General
Motors, Detroit). These methods have a different flavor than Bezier or B-spline
methods : instead of being described by control nets, they “fill in” curve networks
in order to generate surfaces.
Let us review the part of the design process that appreciates this method of
modeling. Even in the early days of CAD/CAM, the first step in the design of a
new car is the manual production of a clay or wooden model of that car. The CAD
process begins with the task of communicating the form of this model to the CAD
database.
This communication process starts with data acquisition; in this case, the model is
digitized : a digitizing device records points (in a fixed coordinate system) where a
sensor touches the model surface. This sensor is moved over the model along
certain predefined lines, called feature lines. Each of these lines is thus broken
down into a sequence of digitized points. Once these are stored, curves are fitted
through them, for example, by using interpolating splines. The resulting network
of curves now must be completed in order to generate a full surface description of
the model. This process – generating a surface from a network of curves – is
solved using Coons and Gordon surfaces.
Before we start with their description, we need to discuss an important “building
block”.
Ruled Surfaces
Ruled surfaces, also called “lofted surfaces”, are both simple and fundamental to
surface design. They are of considerable importance in their own right, in
particular for the design of “functional” surfaces in mechanical engineering. Ruled
surfaces solve the following problem: given two space curves c1 and c2, both
defined over the same parameter interval u ∈ [0, 1], find a surface x that contains
both curves as “opposite” boundary curves. More precisely : find x such that
p(u, 0) = c1 (u), x(u, 1) = c2 (u) . . . (5.31)
Clearly, the stated problem has infinitely many solutions, so we pick the
“simplest” one :
p(u, v) = (1 – v) c1 (u) + v c2 (u), . . . (5.32)
or, with Eq. (5.31) : 77
Geometric Modeling p(u, v) = (1 – v) x (u, 0) + v x (u, 1) . . . (5.33)
Ruled surfaces have the familiar flavor of linear interpolation: every isoparametric
line u = const is a straight line segment, as illustrated in Figure 5.34.
The difference from earlier occurrences of linear interpolation is that now we
interpolate to whole curves, not just discrete points – thus this process is often
referred to as transfinite inte1polation. It is still quite manageable, however: note
how the linear terms in v are kept separate from the data terms in u.
An important aspect of ruled surfaces of the form of Eq. (5.33) is the generality
that is allowed for the input curves p(u, 0) and p(u, 1) : there is virtually no
restriction on them other than having to be defined over the same parameter
interval. For instance, one of the input curves might be a cubic polynomial curve,
the other a spline curve or even a polygon.

Figure 5.34 : Ruled Surfaces : Two Arbitrary Curves C1, C2 are G Given.
A Surface is Fitted between them by Linear Interpolation

Bi-linearly Blended Coons Patch


A ruled surface interpolates to two boundary curves – a rectangular surface,
however, has four boundary curves, and that is precisely to what a Coons patch
interpolates. This first instance of Coons patches was also developed first by
Coons.
To be more precise : given are four arbitrary curves c1 (u), c2 (u) and d1 (v), d2 (v),
defined over u ∈ [0, 1] and v ∈ [0, 1], respectively. Find a surface x that has these
four curves as boundary curves :
p(u, 0) = c1 (u), p(u, 1) = c2 (u) . . . (5.34)
p(0, v) = d1 (v), p(1, v) = d2 (v) . . . (5.35)
We have just developed ruled surfaces, so let us utilize them for this new problem.
The four boundary curves define two ruled surfaces :
rc(u, v) = (1 – v) × (u, 0) + v × (u, 1) . . . (5.36)
and rd(u, v) = (1 – u) × (0, v) + u × (1, v) . . . (5.37)
Both interpolants are shown in Figure 5.33, and we see that rc interpolates to the
c-curves, yet fails to reproduce the d-curves. The situation for rd is similar, and,
therefore, equally unsatisfactory. Both rc and rd do well on two sides, yet fail on
the other two, where they are linear. Our strategy is, therefore, as follows : let s try
to retain what each ruled surface interpolates to and let us try to eliminate what it
fails to interpolate to. A little thought reveals that the “interpolation failures” are
captured by one surface: the bilinear interpolant rcd to the four corners :
⎡ p(0,0) p(0,1) ⎤ ⎡1 − v ⎤
rrd (u , v) = [1 − u u ] ⎢ ⎥ . . . (5.38)
⎣⎢ p(1,0) p(1,1) ⎦⎥ ⎢⎣ v ⎥⎦

We are now ready to create a Coons patch x. It is given by


78 x = rc + rd – rcd . . . (5.39)
or, in the form of a recipe: “loftu + loftv – bilinear”. The involved surfaces and the Surface Modeling
solution are illustrated in Figure 5.35. Writing in full detail gives
⎡ p (0, v ) ⎤ ⎡1 − v ⎤
p (u , v) = [1 − u u ] ⎢ ⎥ + [ p (u , 0) p (u , 1) ] ⎢ ⎥
⎢⎣ p (1, v ) ⎥⎦ ⎣ v ⎦

⎡ p(0,0) p(0,1) ⎤ ⎡1 − v ⎤
− [1 − u u ] ⎢ ⎥ . . . (5.40)
⎣⎢ p(1,0) p(1,1) ⎦⎥ ⎢⎣ v ⎥⎦

We can now justify the name “bilinearly blended” for the above Coons patch : a
ruled surface “blends” together the two defining boundary curves; this blending
takes place in both directions. However, the Coons patch is not generally itself a
bilinear surface – the name refers purely to the method of construction.
The functions 1 – u, u and 1 – v, v are called blending functions. A close inspection
of 5.40 reveals that many other pairs of blending functions, say, f1 (u),
f2 (u) and g1 (v), g2 (v), could also be used to construct a generalized Coons patch. It
would then be of the general form

⎡ p (0, v) ⎤ ⎡ ⎡ g (v ) ⎤ ⎤
p (u , v) = [ f1 (u ) f 2 (u )] ⎢ ⎥ + ⎢ p (u , 0) p (u , 1) ⎢ 1 ⎥ ⎥
⎣ p (1, v) ⎦ ⎣ ⎣ g 2 (v ) ⎦ ⎦

⎡ p(0,0) p(0,1) ⎤ ⎡ g1 (v) ⎤


− [ f1 (u ) f 2 (u )] ⎢ ⎥ . . . (5.41)
⎢⎣ p(1,0) p(1,1) ⎥⎦ ⎢⎣ g 2 (v) ⎥⎦

Figure 5.35 : Coons Patches : A Bilinearly Blended Coons Patch is Composed


of Two Lofted Surfaces and a Bilinear Surface

There are only two restrictions on the fi and gi : each pair must sum to one
identically : otherwise we would generate non-barycentric combinations of points.
Also, we must have f1 (0) = g1 (0) = 1, f1 (1) = g1 (1) = 0 in order to actually
interpolate. The shape of the blending functions has a predictable effect on the
shape of the resulting Coons patch. Typically, one requires f1 and g1 to be
monotonically decreasing; this produces surfaces of predictable shape, but is not
79
Geometric Modeling necessary for theoretical reasons. Surface modelers that employ Coons patches
typically allow designers to change the blending functions as a way to model the
interior of the patch.
Partially Bi-cubically Blended
The bilinearly blended Coons patch solves a problem of considerable importance
with very little effort, but we pay for that by an annoying drawback. Consider
Figure 5.36 : It shows two bilinearly blended Coons patches, defined over
u ∈ [0, 2], v ∈ [0, 1]. The boundary curves v = 0 and v = 1, both composite curves,
are differentiable. However, the cross boundary derivative is clearly discontinuous
along u = 1.
Analyzing this problem, we see that it can be blamed on the fact that cross
boundary tangents along one boundary depend on data not pertaining to that
boundary. For example, for any given bilinearly blended Coons patch, a change in
the boundary curve p(1, v) will affect the derivatives across the boundary p(0, v).

Figure 5.36 : Coons Patches : The Input Curves for Two Neighboring Patches
May have 01 Boundary Curves (Left), Yet the Two Coons Patches
Determined by Them Do Not Form a Smooth Surface (Right)

We can separate the derivatives across one boundary from information along the
opposite boundary by using different blending functions, namely, some that have
zero slopes at the endpoints. Striving for simplicity, we can find two for such
blending functions: the cubic Hermite polynomials H 03 and H 33 .

Let us investigate the effect of this choice of blending function : set f1 = g1 = H 03


and f2 = g2 = H 33 in (5.41). The cross boundary derivative along, say,
u = 0, now becomes :

⎡ H 3 (v ) ⎤
xu (0, v) = [ xu (0, 0) xu (0, 1)] ⎢ 0 ⎥ . . . (5.42)
⎢⎣ H 33 (v) ⎥⎦

Aall other terms vanish since d / duH 33i (0) = d / duH 33i (1) = 0 for i = 0 and i = 1.
Thus, the only data that influence pu along u = 0 are the two tangents pu (0, 0) and
pu (0, 1) – we have achieved our goal of making the cross boundary derivative
along one boundary depend only on information pertaining to that boundary. With
our new blending functions, the two patches from Figure 5.34 would now be C1.
Unfortunately, the partially bicubically blended Coons patches, constructed as
above, suffer from zero corner twists and thus at the patch corners, these patches
often seem to have “flat spots”.
xuv (i, j) = 0; i, j ∈ {0, 1}.
This is easily verified by simply taking the u, v-partial of Eq. (5.41) and evaluating
at the patch corners. We will now modify the partially bicubically blended Coons
patch in order to avoid the flat spots at the corners.
Bicubically Blended Coons Patch

80
Cubic Hermite interpolation needs more input than positional data – first derivative Surface Modeling
information is needed. Since our positional input consists of whole curves, not just
points, the obvious data to supply are derivatives along those input curves. Our
given data now consist of
p(u, 0), p(u, 1), p(0, v), p(l, v) and pv(u, 0), pv(u, 1), pu(0, v), pu(l, v)

Figure 5.37 : Coons Patches : for the Bicubically Blended Case, the Concept of the Lofted Surface is
Generalized. In Addition to the given Boundary Curves, Cross Boundary Derivatives are Supplied

We can think of the now prescribed cross boundary derivatives as “tangent


ribbons,” illustrated in Figure 5.37 (only two of the four “ribbons” are shown
there).
The tensor product of bicubic Hermite interpolant is :

[ H 03 (u ) H13 (u ) H 23 (u ) H 33 (u )]

⎡ H 03 (v) ⎤
⎡ p (0,0) pv (0,0) pv (0,1) p (0,1) ⎤ ⎢ ⎥
⎢ p (0,0) puv (0,0) puv (0,1) pu (0,1) ⎥⎥ ⎢ H13 (v) ⎥
hcd (u , v) = ⎢ u ⎢ ⎥ . . . (5.43)
⎢ pu (1,0) puv (1,0) puv (1,1) pu (1,1) ⎥ ⎢ H 23 (v) ⎥
⎢ ⎥ ⎢ 3 ⎥
⎣ p (1,0) pv (1,0) pv (1,1) p (1,1) ⎦
⎣⎢ H 3 (v) ⎦⎥
The bicubically blended Coons patch now becomes
p = hc + hd – hcd . . . (5.44)
Before closing this section, we need to take a closer look at the hcd part of (5.44).
On closer inspection, we find that it wants data that we were not willing to provide
in our initial problem description, namely, the central “twist partition” of the 4 × 4
matrix in Eq. (5.43). The bicubically blended Coons patch needs these quantities
as input, and this has caused CAD software developers many headaches since
Coons proposed his surface scheme in 1964. The most popular “solution” seems to
be simply to define each of the four corner twists to be the zero vector.
Example 5.7
Show that if the boundary curves of a bilinear Coons patch are coplanar, the
resulting patch is also planar.
Solution
We need to show that the surface normal at any point on the surface is normal to
the plane of the boundary curves. The surface tangent vectors are :
Pu (u, v) = [Pu (u, 0) + P (1, v) – P (0, v) + P (0, 0) – P (1, 0)] + v [(Pu (u, 1)
– Pu (u, 0) + P (1, 0) – P (0, 0) – P (1, 1) + P (0, 1)) = A + v B and 81
Geometric Modeling Pv (u, v) = [Pv (0, v) + P (u, 1) – P (u, 0) + P (0, 0) – P (0, 1)] + u [Pv (1, v)
– Pv (0, v) – P (0, 0) + P (0, 0) + P (0, 1) + P (1, 0) – P (1, 1)] = C + u D
It can easily be shown that Pu (u, v) and Pv (u, v) lie in the plane of the boundary
curves. Considering Pu (u, 0), P (1, 0), P (1, 0) – P (0, 0), and P (0, 1) – P (1, 1)
also lie in the given plane. Therefore, vectors A and B lie in the plane.
Consequently, the tangent vector Pu (u, v) to the surface at any point (u, v) lies in
the plane of the boundary curves. The same argument can be extended to Pv (u, v).
The surface normal is given by :
N (u, v) = Pu × Pv = (A + v B) × (C + u D) . . . (5.45)
which is perpendicular to the plane of Pu and Pv and, therefore, the plane of the
boundary curves. Thus, for any point on the surface, the direction of the surface
normal is constant (the magnitude depends on the point) or the unit normal is fixed
in space. Knowing that the plane surface is the only surface that has a fixed unit
normal, we conclude that a bilinear Coons patch degenerates to a plane if its
boundary curves are coplanar. Thus, this patch can be used to create planes with
curved boundaries similar to the bicubic surface covered. Note, however, that a
bicubic Coons patch or any other patch that has nonlinear blending functions does
not reduce to a plane when all its boundaries are coplanar.
Blending of Surfaces
Examples and Motivation
Blending surfaces, providing a smooth connection between various primary
or functional surfaces, are very common in CAD. Examples include
blending surfaces between :
• Fuselage and wings of airplanes
• Propeller or turbine blade and hub
• Bulbous bow and ship hull
• Primary faces of solid models.
Blending (or filleting) surfaces are also byproducts of manufacturing
processes such as NC milling with a ball or disk cutter.
As a result of continuity conditions, blending surfaces are of higher order, or
involve a more complex formulation than the underlying surfaces to be
joined.
Implicit Surfaces
Let us turn to implicit surfaces. Implicit surfaces are very useful in modeling. For
example, suppose we are given two surfaces and want to find a third one that can
smoothly joining the given surfaces together. This process is called blending and
the third surface is a blending surface of the given surfaces. This blending surface
is of course not unique and is usually in an implicit form. The following figure
shows a blending surface (in yellow) that blends the green and the blue surfaces.
The blending surface provides a smooth transition from the green surface to the
blue one.

In addition to blending, many applications and computations such as offsetting


naturally generate algebraic surfaces. In fact, in many cases, algebraic surfaces are
82
very useful. Point classification is a good example. Point classification determines Surface Modeling
if a given point lies inside, on or outside of a surface. It is not easy to design an
algorithm for parametric surface; however, for implicit surfaces it is a simple
matter. Suppose the given point is (a, b, c) and the implicit surface is given by
p(x, y, z) = 0. Then, if p(a, b, c) is greater than, equal to or less than zero, (a, b, c)
lies outside, on or inside of the surface.
One can easily compute the normal vector of an algebraic surface. In fact, the
formal vector of a polynomial p(x, y, z) = 0 is simply its gradient :
⎛ ∂p ∂p ∂p ⎞
Δ( p) = ⎜ , , ⎟
⎝ ∂x ∂y ∂z ⎠
Once we have the normal vector at a point, the tangent plane can be easily
computed.
Unfortunately, displaying an algebraic surface is not easy. The easiest but also the
most time consuming way is ray-tracing. Many ray-tracers allow users to specify
an implicit equation. POVRAY and Radiance are good examples. However,
ray-tracing is very slow. Another possibility is triangulating the surface, which is
similar to what we did earlier for parametric surfaces. For implicit surfaces,
however, situation is different because we do not have a domain to triangulate.
More precisely, triangulation must be carried out directly on the surface. Programs
that can subdivide an implicit surface into polygons (not necessarily triangles) are
usually referred to as polygonizers. Developing such polygonizers is not an easy
job and is still a research problem.
The following surfaces are generated from a well-known polygonizer by Jules
Bloomenthal, which has been incorporated into our surface system. The left
surface is a hyperbolic paraboloid and the right one is a ring Dupin cyclide, which
is a degree 4 rational surface. These two surfaces are triangulated into a large
number of small triangles each of which is colored with a random color. However,
it is not necessary to have such a large number of triangles.

Singularities
83
Geometric Modeling A general problem of these polygonizers is that most of them do not deal with
singularities very well. A point on a parametric or implicit surface is singular if all
partials are zero. Singular points are part of the self-intersection of the surface or
sharp edges on the surface. The following figures show different types of
singularities.

The first is a cubic surface whose equation is


x2 + y3 – y2 + z2 = 0
The gradient of this surface is
(2x, 3y2 – 2y, 2z)
Therefore, (0, 0, 0) is a singular point because at this point all components of the
gradient are zero. This is the indicated point on the surface. Note that there is
another singular point at (0, 2/3, 0).
The middle figure has an equation as follows :
– x3 + 2xz – yz2 = 0
This surface has the following gradient vector
(– 2x2 + 2z, – 2yz, 2x – y2)
From the second component, we have either y = 0 or z = 0. If y = 0, the third
component forces x to be zero and hence the first component forces z to be zero. If
z = 0, the first component forces x to be zero and the third component forces x to
be zero. Both causes yield the singular point (0, 0, 0).
While the first two cases have only isolated singular points, singular points can be
on a line or even on a curve. Let us consider the right figure above, which has the
following equation :
– x2 y + x2 – yz2 – z2 = 0
This surface has the following gradient vector
(– 2xy + 2x, – (x2 + z2), – 2z)
If z = 0, the second component implies that x must also be zero. If both x and z are
zero, the first component will also be zero no matter what values y may have. This
means that as long as x = z = 0 and y has an arbitrary value we have a singular
point. Therefore, the y-axis contains all singular points. The figure shows three
lines. All of them lie on the surface; however, the vertical line is the y-axis which
is also the self-intersection line containing all singular points.

84
Surface Modeling
SAQ 4
(a) Discuss Tensor product form of a coons patch and its properties.
(b) Show that the bilinearly blended Coons patch is not in the convex hull of its
boundary of curves.
(c) Show that the bilinearly blended Coons patch, when applied to cubic
boundary curves, yields a cubit patch.
(d) Show that a bilinear Coons patch cannot provide C1 continuity between
adjacent patches even if their boundary curves form a C1 continuity
network.

Exercise 1
(a) Compute and plot all basis functions up to degree 2 for knot vector
U = {0, 1, 2, 3, 4}.
(b) Compute and plot all basis functions up to degree 2 for knot vector
U = {0, 1, 2, 3, 3, 3, 4, 5, 6}.
(c) Verify the following propositions with convincing arguments :
Ni, p (u) is a degree p polynomial.
For all i, p and u, Ni, p (u) is non-negative.

5.5 SUMMARY
This unit deals with different design tools required for the construction of smooth curves
and surfaces for modeling for the real world.
The process of modeling is made much easier for a mathematical description of an object
or at least on a part of the object may be applied.
Surfaces can be defined mathematically as in 3-dimensions space as parametric and
non-parametric equations.
There are two types of surfaces that are commonly used in modeling system – parametric
and implicit. Parametric surfaces are defined by a set of three functions one for each
co-ordinates. Implicit surfaces are defined by a polynomial of three variables.
Parametric surfaces can represent sphere and ellipsoids where as spheres can easily be
described by implicit surfaces. In terms of expressive power, implicit surfaces are more
powerful than parametric surfaces.
Surface revolution is a method of generating as 3-D surface by revolving a 2-D entity.
Such as a line, a plane, a curve around an axis in space.
3-D surfaces are also obtained by transversity an entity, e.g. a line polygone or a curve
along a path in space. The resulting surfaces are called sweep surfaces. The simplest
sweep entity is a point.
Complex paths can be developed by combining simple paths, e.g. combining two paths
of a point yield a single turn of a helical path.
Various design tools originated from car companies, e.g. Bazier curves and surfaces were
developed by Citroen and Renault, Coon’s patches were developed for Ford Detroit and
Gorden surfaces for General Motors Detroit.
The first step in design is the manual production of a model in wood or clay which is
then digitised and records points where the sensor touches the model surface. From these
degitised points, using various design tools, surfaces in 3-D formate are developed.

85

S-ar putea să vă placă și