CHAPTER 5: SURFACES

 

1  Introduction

Surface design should be more complicated than curve design. However, we shall make use of many of the tools and algorithms that we have studied up to this moment.

Consider a spatial polynomial curve with control polygon given by {c0,..., cm}, ciA3. It is represented as:

c(u) = Σi = 0m ci Bmi(u)  .

If we allow the control polygon vertices to move along parametrized curves  ci(v),

c(u,v) = Σi = 0m ci(v) Bmi(u)  ,
 

the Bézier curves c(u,v0), with polygons {c0(v0),..., cm(v0)}, evolve through the space describing a parametrized surface c(u,v). Example.

fig501

2  Bézier Surfaces

We are interested in the evolution of vertices along non-arbitrary curves ci(v) but Bézier curves of degree n with respective control polygons {ci,0,...,ci,n}. Then the parametrization,

c(u,v) = Σi = 0mΣj = 0nci,jBmi(u)Bnj(v)  ,   u,v ∊ [0,1]  ,
(1)
 

describes a surface of degree (m,n) defined by a control net of (m+1)(n+1) vertices, {c0,0,...,cm,n}.

fig500

The constant parameter u curves,

 

c(u0,v) = Σj = 0ni = 0mci,jBmi(u0))Bnj(v)  ,      v ∊ [0,1]  ,
 

are Bézier curves of degree n with polygons of vertices cj = (Σici,jBmi(u0)). 

While the v constant parameter curves,

c(u,v0) = Σi = 0mj = 0nci,jBnj(v0))Bmi(u)  ,      u ∊ [0,1]  ,
 

are Bézier curves of degree m with polygons of vertices ci = (Σjci,jBnj(v0)).

As with non-parametric curves, we can represent graphics of polynomial functions of two variables, f(u,v), because they can be parametrized as c(u,v) = (u,v,f(u,v)).  

If we describe f(x,y) as a combination of a control net on the real line, { c'0,0,..., c'm,n}, the graphic of the function will be determined by the control net { c0,0,..., cm,n}, whose vertices are

ci,j = ( i
m
, j
n
, c'i,j)  .
(2)
fig505

The tensor product representation can be adapted in order to construct B-spline surfaces. The only thing we have to do is to replace Bernstein polynomials by B-spline functions. 

Hence,  in order to determine a B-spline surface of degree (m,n) with MxN pieces, we should provide two sequences of knots, {u0,..., u2m+M-2}, {v0,..., u2n+N-2} and a control net formed by the vertices {d0,0,...,dm+M-1,n+N-1}. The parametrization,

c(u,v) = Σi = 0m+M-1Σj = 0n+N-1di,jNmi(u)Nnj(v)  ,
(3)
 

is defined over the interval [um-1,um+M-1]x[vn-1,vn+N-1].

fig504

As with B-spline curves, it is usual that the knot sequence begins and ends with m and n knots repeated.

Even introducing weights {wi,j} does not disturb at all on defining rational and piecewise rational surfaces,

c(u,v) = Σi = 0mΣj = 0nwi,jci,jBmi(u)Bnj(v)  ,
Σi = 0mΣj = 0nwi,jBmi(u)Bnj(v)  ,
(4)

that allow us, for example, to describe in an precise way a cylinder, for example.

fig507

c(u,v) = Σi = 0m+M-1Σj = 0n+N-1wi,jdi,jNmi(u)Nnj(v)  ,
Σi = 0m+M-1Σj = 0n+N-1wi,jNmi(u)Nnj(v)  .
(5)

3  Properties of Bézier patches

As a generalization of polynomial curves, Bézier surfaces inherit most of their properties.

Consequently,

Σi = 0mΣj = 0nBmi(u)Bnj(v) = 1  , 
(6)
 

our basis of functions is a partition of unity as well.

Affine invariance

f(c(u,v)) = Σi = 0mΣj = 0nf(ci,j)Bmi(u)Bnj(v)  ,   u,v ∊ [0,1]  ,
(7)
 

for each and every affine map f. Besides rational surfaces are projectively invariant.

Convex hull property of the control net: the surface is included in the convex hull of the control net. Example. For piecewise surfaces, every piece is included in the convex hull of their control net.

fig512

Diminishing variation property: This property is not inherited from the univariate case. Counting intersections with straight lines, as we did for curves, would not make Bézier patches variation diminishing. It is easy to construct a patch that is intersected by a straight line while its control net is not.

fig513

In order to redefine the parametrization over a rectangular set, [a,b]x[c,d], different from [0,1]x[0,1], we just reparametrize:

u( u') = u'-a
b-a
  ,    u' ∊ [a,b]  ,       v( v') = v'-c
d-c
  ,    v' ∊ [c,d]  ,
 

Consequently, the new parametrization will be:

c'(u', v') = c(u( u'),v(v')): = c( u'-a
b-a
, v'-c
d-c
)  ,    u' ∊ [a,b]  ,    v' ∊ [c,d]  .

As Bézier curves pass through the first and last vertices, corresponding to t = 0, t = 1, Bézier surfaces pass through the four vertices that lie at the four corners of the control net,

c0,0 = c(0,0)  ,    cm,0 = c(1,0)  ,    c0,n = c(0,1)  ,   cm,n = c(1,1)  ,
 

Furthermore: the four Bézier curves that formed the corners of the control net lie on the patch. For instance, if u = 0,

c(0,v) = Σj = 0nc0,jBnj(v)  ,    v ∊ [0,1]  ,
 

The corresponding curve c(0,v), has as control polygon {c0,0,..., c0,n}: it is the first row of the control net of the surface. At the same time, the last row, {cm,0,..., cm,n}, is the control polygon of the curve c(1,v). And for v = 0,

c(u,0) = Σi = 0mΣj = 0nci,jBmi(u)Bnj(0) = Σi = 0mci,0Bmi(u)  ,    u ∊ [0,1]  ,
 

the control polygon of the curve c(u,0) is the first column of the control net {c0,0,..., cm,0}. Analogously, the control polygon of c(u,1) is the last row: {c0,n,..., cm,n}.

The curves that form the sides of the control net lie on the patch. Example.

fig506

This property works as well with rational and piecewise rational surfaces, if the knots at the beginning and at the end of each piece have multiplicity equal to the degree.

Piecewise surfaces fulfill local control property as well. A generic vertex of the control net affects at most (m+1)·(n+1) pieces of the surface. In the following figure the vertex c3,3 has been displaced. The surface is a surface of degree (2,2) with  5x5 segments. Example.

fig521  

If a weight is increased, the surface approaches the corresponding vertex of the net. Example.

fig510

The main inconvenients of the tensor product representation are the limitations on the topology of the surface. If surfaces are open, there is no problem at all, but if they are closed, the only topologies allowed are those of the cylinder and the torus. In order to represent the sphere we have to use degenerate nets whose vertices overlap at the poles.

fig514

4  The de Casteljau Algorithm

We can easily extend the de Casteljau Algorithm to surfaces: we just apply the algorithm to each column of the control net, as if they were curves of degree m,

cr,0)i,j(u): = (1-u) cr-1,0)i,j(u)+ucr-1,0)i+1,j(u)  ,
i = 0,..., m-r  ,    r = 1,...,m  ,    j = 1,...,n  ,
(8)
 

until we end with a point at the m-th iteration of each column  {cm,0)0,0(u),...,cm,0)0,n(u)}, which can be considered as a curve of degree n. 

Applying the algorithm once more,

cm,s)0,j(u,v): = (1-v) cm,s-1)0,j(u,v)+vcm,s-1)0,j+1(u,v)  ,
j = 0,..., n-s  ,    s = 1,...,n  ,
(9)
 

until we the last iteration, we get the point c(u,v) on the surface,

c(u,v) = cm,n)0,0(u,v)  .
(10)

The procedure is symmetric. We can do it with the rows.

The blossom of a Bézier surface is: 

c[u1,...,um;v1,..., vn]: = c[u1,...,um][v1,..., vn] = c[v1,..., vn][u1,...,um]  ,
(11)
 

that is, we evaluate the blossom first at u1,...,um in each column of the control net and we evaluate the resulting polygon of degree n at :v1,...,vn. We can do it first with the rows  v1,...,vn and then with the resulting column u1,...,um.

If we want to limit the surface c(u,v)  to the interval [a,b]x[c,d], the new control net {c'0,0,..., c'm,n} is ,

c'i,j = c[a < m-i > ,b < i > ;c < n-j > ,d < j > ]  .
(12)
fig518
Example.

5  Degree elevation

A surface of degree (m,n) and control net, {c0,0,...,cm,n}, can be described as a surface of degree (m+1,n) just applying the degree elevation algorithm to the n+1 columns of the control net independently,

c(u,v) = Σi = 0mΣj = 0nci,jBmi(u)Bnj(v) = Σi = 0m+1Σj = 0nc1,0i,jBm+1i(u)Bnj(v)  ,
(13)
c1,0i,j = (1- i
m+1
)ci,j+ i
m+1
ci-1,j  ,
(14)
 

Analogously, if we want to express this surface as of degree (m,n+1), we just apply the degree elevation algorithm to the m+1 rows of the control net independently,

c(u,v) = Σi = 0mΣj = 0nci,jBmi(u)Bnj(v) = Σi = 0mΣj = 0n+1c0,1i,jBmi(u)Bn+1j(v)
(15)
c0,1i,j = (1- j
n+1
)ci,j+ j
n+1
ci,j-1  .
(16)
fig517  

We can extend it to the rest of the formulae: blossom and repeated degree elevation.

Example.

6  Derivatives

For curves, derivatives were carried out by taking differences of control points. We shall consider partial derivatives with respect to the variables u,v in Bmi(u)Bnj(v).

For instance, the partial derivative with respect to u,

∂c(u,v)
∂u
= mΣj = 0nΣi = 0m-1Δ1,0 ci,jBm-1i(u)Bnj(v)  ,
(17)
 

where:

Δi,j ci,j = Δi-1,j ci+1,ji-1,j ci,j = Δi,j-1 ci,j+1i,j-1 ci,j  ,
 

the first values are the generalization of the standard difference operator with just one index,

Δ1,0 ci,j = ci+1,j- ci,j   ,      Δ0,1 ci,j = ci,j+1- ci,j  .

The partial derivative with respect to v is

∂c(u,v)
∂v
= nΣi = 0mΣj = 0n-1Δ0,1 ci,jBmi(u)Bn-1j(v)  ,
(18)
 

and higher-order derivatives:

r+s c(u,v)
∂ur ∂vs
= m! n!
(m-r)!(n-s)!
Σi = 0m-rΣj = 0n-sΔr,sci,jBm-ri(u)Bn-sj(v)  .
(19)

We can evaluate it along isoparametric lines. The ones on the boundary are those of most interest: for u = 0, u = 1, v = 0, v = 1. 

Consider the case: u = 0. A partial derivative is the tangent vector of an isoparametric curve.

This derivative is called cross boundary derivative along the edge v = 0. The cross boundary derivative depends on only two rows. 

Cross boundary derivatives with respect to u:

r c(u,v)
∂ur
¦u = 0 = m!
(m-r)!
Σj = 0nΔr,0c0,jBnj(v)  .
(20)

For instance, for u = 1,

r c(u,v)
∂ur
¦u = 1 = m!
(m-r)!
Σj = 0nΔr,0cm-r,jBnj(v)  .
(21)

 

We shall make use of these results for constructing polynomial patches.

Given two Bézier surfaces parametrized by c(u,v) and c'(u,v), respectively, over the intervals [u0,u1]x[v0,v1], [u1,u2]x[v0,v1], with control nets {c0,0,..., cm,n} and { c'0,0,..., c'm,n},  and linked by a common boundary u = u1, the condition of continuity implies that the curves c(u1,v), c'(u1,v) must be the same, i. e., the last row of the first control net and the first row of the second one are the same:

c(u1,v) = c'(u1,v)      implies   cm,j = c'0,j j = 0,...,n  .
(22)

They are differentiable with continuity (C1 ) across their common boundary curve if (see 20-21),

∂c(u,v)
∂u
¦u = u1 = ∂ c'(u,v)
∂u
¦u = u1
Δ1,0cm-1,j
Δu0
= Δ1,0 c'0,j
Δu1
  ,    j = 0,...,n  .
(23)
fig522

We can interpret it if we think of the columns of the nets {c0,j,..., cm,j}, { c'0,j,..., c'm,j} as control polygons of piecewise curves to which we are imposing the condition of having continuous first derivative.

Consequently, the C1 condition affects the vertices of the last two rows of the first surface and the first two rows of the second surface.

However, if we impose instead of (23) the pair of vectors Δ1,0 cm,j, Δ1,0 c'0,j to be parallel, we get a surface that in general does not even have a tangent plane at the points of the boundary, but at the endpoints (this can be verified calculating the normal vector along the boundary).

fig523

The Cr condition for piecewise surfaces is:

Δr,0cm-r,j
(Δu0)r
= Δr,0 c'0,j
(Δu1)r
  ,    j = 0,...,n  .
(24)

From formula 19 for r=s=1, we obtain a mixed partial which is known as the twist. The twist of a surface is its mixed partial derivative ∂2/∂u∂v:

2 c(u,v)
∂u ∂v
= mnΣi = 0m-1Σj = 0n-1Δ1,1ci,jBm-1i(u)Bn-1j(v)  ,
(25)
 

We can re-write the coefficients in order to obtain a easy geometrical interpretation:

Δ1,1ci,j = ci+1,j+1-ai,j = ci+1,j+1-ci+1,j-ci,j+1+ci,j  ,
ai,j = ci+1,j+ci,j+1-ci,j = ci,j+ci,jci+1,j+ci,jci,j+1  .
fig524

The vector Δ1,1ci,j represents the deviation of the vertex ci+1,j+1 with respect to the parallelogram determined by ci,j, ci+1,j,ci,j+1,ai,j.

At the corners of the boundary of the surface, for instance, at c0,0, the twist is proportional to  Δ1,1c0,0 and, as the vectors c0,0c1,0, c0,0c0,1 determine the tangent plane at c0,0, the twist vector is a measure of the deviation of c1,1 from the tangent plane at c0,0.

A bicubic Bézier surface has a control net with 16 vertices, of which 12, the outer ones, are determined by the curves on the boundary. Thus, we only have freedom for choosing the 4 inner vertices which could be determined if we fix the twists of the corners. Hence, choosing the twists is fundamental in order to determine the surface that fills in the space between four curves. 

Example.

fig526

The easiest choice is taking null twists. The surfaces with null twists are called translational surfaces. Example.

fig528

We can use the derivatives of the parametrization for constructing normal vectors to the surface. The normal vector of a surface is a normalized vector that is orthogonal to the surface at a given point. It can be computed from the cross product of any pair of vectors that are tangent to the surface at that point. We may set:

n(u,v) = ∂c(u,v)
∂u
x ∂c(u,v)
∂v
  ,
 

This expression, normalized, is the normal vector.

It is not valid if partial derivatives are parallel or null.

At the four corners of the patch, the involved partial derivatives are simply differences of boundary points. For example, at c0,0 = c(0,0),

n(0,0) = Δ1,0c0,00,1c0,0  ,
(26)
 

The normal at one of the corners is undefined if c0,0, c0,1, c1,0 are linearly dependent (collinear).

fig529

7  Interpolation and approximation

Assume that we are given an array of (m+1)·(n+1) data points in space: {a0,0,..., am,n}, and we want a surface c(u,v) to interpolate them,

ai,j = c(ui,vj)  ,       i = 0,...,m        j = 0,...,n  .
(27)

We try a tensor product patch of degree (m,n). We can describe it as BUCBVt = A,

A = (
a0,0
...
a0,n
:
···
:
am,0
...
am,n
)   ,
BU = (
Bm0(u0)
...
Bmm(u0)
:
···
:
Bm0(um)
...
Bmm(um)
)
C = (
c0,0
...
c0,n
:
···
:
cm,0
...
cm,n
)  ,
BV = (
Bn0(v0)
...
Bnn(v0)
:
···
:
Bn0(vn)
...
Bnn(vn)
)  ,
 

where the matrices A,C define three linear systems.

The coordinates of the vertices of the control net can be obtained inverting the matrices

 C = BU-1A(BVt)-1

However, it is easier to define auxiliary matrices (interpolating curves approach) C': = BUC, which will be the unknowns of the system C'BVt = A.

Thus, the tensor product formalism allows a significant "compactification" of the interpolation process. Without it, we would have to solve a linear system of order (m+1)·(n+1) instead of solving two systems of  respectively (m+1) and (n+1) equations. Example.

fig530

Another option is using bicubic B-spline patches. The philosophy is the same but introducing B-spline functions instead of Bernstein polynomials.

Assume that our given data must satisfy ai,j = c(ui,vj), for i = 0,...,M, j = 0,...,N. We can fix ui and interpolate a cubic spline through the points of the corresponding row {ai,0,...,ai,N}. 

We shall obtain M+1 B-spline polygons, one for each row, that form a matrix of points { d'0,0,..., d'M,N+2}. Interpolating with cubic splines each column { d'0,j,..., d'M,j} we obtain a family of N+3 B-spline polygons, {d0,0,..., dM+2,N+2}, that form the B-spline net of the interpolant surface. 

The knot sequences are {u0,..., uM}, {v0,..., vN}, with the initial and final knots repeated three times.

Obviously we have to impose further conditions in order to obtain a unique solution.

Example.

fig533

In general, we must expect a problem with unstructured data: we must assign to the data ai some parameters (ui,vi) that do not conform a rectangular net.

Consider the approximation problem for obtaining a surface of degree (m,n) that approximates a given set of data, {a0,...,aM}, such that ai = c(ui,vi). The linear system of the problem,

(
Bm0(u0)Bn0(v0)
...
Bmm(u0)Bnn(v0)
:
···
:
Bm0(uM)Bn0(vM)
...
Bmm(uM)Bnn(vM)
)(
c0,0
:
cm,n
) = (
a0
:
aM
)  ,
(28)
 

has (m+1)·(n+1) unknowns for M+1 equations. Hence, the system is overdetermined.

We try a least squares approximation.  

If we write our system as BC = A, we can transform it into (m+1)·(n+1) equations with the same number of unknowns,

BtBC = BtA  ,
(29)
 

Although it is in principle solvable, for a large number of data it is bad conditioned.

fig534


© Leonardo Fernandez-Jambrina and Rubén López-Pulido