Documente Academic
Documente Profesional
Documente Cultură
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
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
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.
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
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.
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
49
Geometric Modeling
(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)
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
⎡⎛ 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.
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.
⎡ −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⎦
⎡ −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⎦
⎡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)
(a) (b)
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
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 )
59
Geometric Modeling
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)
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) ⎥⎦
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).
= 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
⎡ (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
⎡ −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
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) ⎦⎥
(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.
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’.
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
m
p (u , v ) = ∑N
i =0
i , p (u ) qi (v ) . . . (5.30)
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
⎡ 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) ⎥⎦
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
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
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
⎡ 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 ) ⎦ ⎦
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 .
⎡ 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
[ 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.
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.
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