Title Page
Contents
JJ II
J I
Page1of29
Go Back
Full Screen
Close
Quit
Surfaces:Tensor Products
Milind Sohoni
http://www.cse.iitb.ac.in/˜ sohoni
Contents
JJ II
J I
Page2of29
Go Back
Full Screen
Polynomials in 2 variables
Let
P
m,n[u, v]
denote the vector space of all polynomials of degree atmostm
inu
andn
inv
. Thus, for example,3u
2v
−v
3 ∈P
2,3[u, v]
⊂P
3,3[u, v]
The dimension of
P
m,n[u, v]
is obviously(m + 1)(n + 1)
and the Taylor basisfor it is the set:{uivj|0 ≤ i ≤ m, 0 ≤ j ≤ n}
Just as polynomials in one variable served us to parametrize curves, these will serve us to parametrize surfaces.
Title Page
Contents
JJ II
J I
Page3of29
Go Back
Full Screen
Close
Quit
Tensor-Product Bases
Actually, if
B =
{b
0(u), . . . , b
m(u)
} is a basis forP
m[u]
andC =
{c
0(v), . . . , c
n(v)
} is a basis forP
n[v]
then:B
⊗C =
{b
i(u)c
j(v)
|0
≤i
≤m, 0
≤j
≤n
}is a basis for
P
m,n[u, v]
.Question :Show that elements of
B
⊗C
are linearly independent.Suppose that (as polynomials):
m
X
i=0 n
X
j=0
αijbi(u)cj(v) = 0
Whence, for every
u
0, we construct the polynomial:p(u0, v) =
n
X
j=0
(
m
X
i=0
αijbi(u0))cj(v)
Contents
JJ II
J I
Page4of29
Go Back
Full Screen
We see that
p(u
0, v) = 0
for allv
, whenceevery
coefficient ofp(u
0, v)
must be zero. In other words, for allj
andu
0,m
X
i=0
αijbi(u0) = 0
Since,
b
i’s are linearly independent, we are forced to conclude thatα
ij= 0
for alli
andj
.2
In particular we have the: Bernstein Basis:
{
m
i
ui(1− u)m−i
n
j
vj(1 −v)n−j|0 ≤ i ≤ m, 0 ≤ j ≤ n} We denote the typical basis element by
B
m(u)B
n(v)
.Title Page
Contents
JJ II
J I
Page5of29
Go Back
Full Screen
Close
Quit
Functions and the Approximation Problem
I
with denote the interval[0, 1]
andI
2 the unit square[0, 1]
×[0, 1]
. Letf : I
2 → R be a function on the unit square.X Y
I2 (x,y)
f(x,y)
Is there a polynomial approximation to
f
?Contents
JJ II
J I
Page6of29
Go Back
Full Screen
The Bernstein-Weierstrass Approximation Theorem
Fix m and n, and form the data
S =
{f
ij= f ( i m , j
n )
|0
≤i
≤m, 0
≤j
≤n
}We define the
Bernstein ApproximationB
m,n(f )(u, v) =
Xi
X
j
f
ijB
im(u)B
jn(v)
Theorem: Let f
be a function on
I2, and let
> 0. Then there are m, nsuch that
|f(u, v) − Bm,n(f)(u, v)| <for all
(u, v) ∈ I2.
Title Page
Contents
JJ II
J I
Page7of29
Go Back
Full Screen
Close
Quit
The Picture
X Y
I2 f(x,y)
The data f
ij
Contents
JJ II
J I
Page8of29
Go Back
Full Screen
The Finer Picture
X f(x,y) Y
f ij
Title Page
Contents
JJ II
J I
Page9of29
Go Back
Full Screen
Close
Quit
The Unit Step
As before it si convenient to associate
B
im(u)B
jn(v)
with the2
-dimensional unit step function below. The ‘greville abscissa’ is obviously(
mi,
nj)
which occurs within the support of the step.m+1 i
m+1 i+1
n+1 j
n+1 j+1
As expected R1 0
R1
0
B
im(u)B
jn(v)dudv =
(m+1)(n+1)1 .Contents
JJ II
J I
Page10of29
Go Back
Full Screen
The Control Polygon
We will now discard the function
f
.Let S be an m
×n matrix
(in C++ notation, i.e., [0. . . m][0. . . n])with entries in
R(or
R3).
S is called the
Control Polygon.We define S (u, v) as:
S(u, v) =
Xi
X
j
S[i, j ]B
im(u)B
jn(v)
S will be called the tensor-product surface for the given control poly-
gon.
Title Page
Contents
JJ II
J I
Page11of29
Go Back
Full Screen
Close
Quit
An example
S[0,2]
S[1,2]
S[2,2]
S[2,0]
S[0,0]
S[0,1]
S[1,1]
S[1,0]
S[2,1]
Control Polygon
I 2
Surface map S S(u,v)
(u,v) Parameter
Space
Model Space
(0,0)
(0,1) (1,1)
(1,0)
Contents
JJ II
J I
Page12of29
Go Back
Full Screen
Some Observations
S(u, v) =
Pi
P
j
S[i, j ]B
im(u)B
jn(v)
Lets evaluate S(0, 0). Since B
im(0) = 0 unless i = 0 and B
jm(0) = 0 unless j = 0, we have S(0, 0) = S[0, 0]. Similarly, we have the other
‘corner points’. Thus:
S(0, 0) = S[0, 0]
S(1, 0) = S[m, 0]
S(0, 1) = S[0, n]
S(1, 1) = S[m, n]
Title Page
Contents
JJ II
J I
Page13of29
Go Back
Full Screen
Close
Quit
Boundary Curves
Next, lets look at
S(u, 0)
, which is the image of a boundary line ofI
2. Again, since on this curvev = 0
, we haveB
jn(0) = 0
forj
6= 0
. Thus the sum reduces to:S(u, 0) =
m
X
i=0
S[i, 0]B
im(u)
This is clearly the bezier curve corresponding to the first column of
S
as its control points.In general, we have:
S(u, 0) =
Pmi=0
S[i, 0]B
im(u) S(u, 1) =
Pmi=0
S[i, n]B
im(u) S(0, v) =
Pnj=0
S[0, j ]B
jn(v) S(1, v) =
Pnj=0
S[m, j]B
jn(v)
Contents
JJ II
J I
Page14of29
Go Back
Full Screen
S[0,2]
S[1,2]
S[2,2]
S[2,0]
S[0,0]
S[0,1]
S[1,1]
S[1,0]
S[2,1]
Surface map S
(0,1) (1,1)
Title Page
Contents
JJ II
J I
Page15of29
Go Back
Full Screen
Close
Quit
And Schematically
In terms of the control matrix, perhaps it is usefule to use the french
notation and number rows and columns from the bottom left corner.Then, we have:
S[0,0] ... S[m,0]
S[0,n] ... S[m,n]
S(u,1)
S(u,0)
S(0,v) S(1,v)
The Control Matrix S
Contents
JJ II
J I
Page16of29
Go Back
Full Screen
But what about general
S(u
0, v)
for a fixedu
0 andv
∈[0, 1]
? OrS[u, v
0]
for a fixedv
0 butu
ranging over[0, 1]
?These curves (in the model space) are called iso-parametric lines. Thus
S[u
0, v]
is the iso-parametric line foru = u
0.Surface map S
Model Space
(0,1) (1,1)
S(u0,v0)
S(u0,v) S(u,v0)
Title Page
Contents
JJ II
J I
Page17of29
Go Back
Full Screen
Close
Quit
Iso-parametric Lines contd.
Lets evaluate S(u
0, v). Re-arranging the sum S(u, v), we see that:
S(u
0, v) =
n
X
j=0
[
m
X
i=0
S[i, j ]B
im(u
0)]B
jn(v)
We call
Pmi=0
S[i, j ]B
im(u
0) as S[u
0, j] and observe that S(u
0, v) is a
bezier curve with control points [S[u0,0], S[u0,1], . . . S[u0, n]].Also, note that each of these control points S[u
0, j] is itself moving on
a bezier curve parametrized by u.
Contents
JJ II
J I
Page18of29
Go Back
Full Screen
Perhaps, the matrix notation is more convenient to observe this. We see that:
S(u, v) = [B
nn(v), . . . , B
0n(v)]
S[0, n] . . . S [m, n]
... ...
S[0, 0] . . . S[m, 0]
B
0m(u)
...B
mm(u)
This may be consicely written as
S(u, v) = B (v)SB (u)
T. Consequently, forming the product asS(u, v) = B(v)(SB (u)
T)
, we see that:S(u
0, v) == [B
nn(v), . . . , B
0n(v)]
S[u
0, n]
...
S[u
0, 0]
Also note that P
i
P
j
B
im(u)B
jn(v) = 1
and thusS(u, v)
is a convex com-S
Title Page
Contents
JJ II
J I
Page19of29
Go Back
Full Screen
Close
Quit
End Tangents and Normals
Given a map S : I
2 → R3as we have already determined the boundary S(0, v), S (u, 0), and so on. Other important data is the first-order data, viz., the tangents.
For convenience, let us consider the boundary point S(u
0, 0). At any boundary point, we have
twotangents to compute.
S
u(u
0, 0) = lim
u→u0 S(u,0)u−−S(uu 0,0)0
S
v(u
0, 0) = lim
v→u0 S(u0,v)−vS(u0,0)These two tangents are shown in the next picture.
Contents
JJ II
J I
Page20of29
Go Back
Full Screen
u v
(0,0) (1,0)
(1,1) (0,1)
S(0,0) S(0,1)
S(1,1)
S(1,0) v
u0
0 S(u ,v )
v=v0 S
0 0 u=u0
S (u ,0) S (u ,0)
0 0
u v
The quantity
S
u(u
0, 0)
is easily computed as the derivative of the boundaryS(u, 0) =
Pmi=0
S[i, 0]B
im(u)
. We may thus use the curve-tangent law explained earlier to get:Title Page
Contents
JJ II
J I
Page21of29
Go Back
Full Screen
Close
Quit
Sv(u0, v)
This quantity is a bit more delicate, since it is the tangent to the iso- parametric curve
S(u
0, v)
atv = 0
.We have seen that:
S (u
0, v) =
n
X
j=0
S[u
0, j]B
jn(v)
where
S[u
0, j] =
Pni=0
S[i, j ]B
im(u
0)
.Thus
S
v(u
0, 0)
, the end-tangent to this curve, ism(S[u
0, 1]
−S[u
0, 0])
. Back-substituting, we get:S
v(u
0, 0) = m[
Pni=0
S[i, 1]B
im(u
0)
− Pni=0
S[i, 0]B
im(u
0)]
= m[
Pni=0
(S[i, 1]
−S[i, 0])B
im(u
0)]
ThusSv(u0,0)is also a bezier with control points[S[1,0]−S[0,0], S[1,1]− S[1,0], . . . , S[m,1] − S[m,0]].
Contents
JJ II
J I
Page22of29
Go Back
Full Screen
Pictorially
S[0,2]
S[1,2]
S[2,2]
S[2,0]
S[0,0]
S[0,1]
S[1,1]
S[1,0]
S[2,1]
Control Points
S (u ,0)v 0 S (u ,0)u 0 normal
Title Page
Contents
JJ II
J I
Page23of29
Go Back
Full Screen
Close
Quit
Splicing
Consider Two surfaces given by control points
S
andT
. We would like to have them meet at a common boundary, and smoothly. Thus for example, we requireS(u, 0) = T (u, 1)
for allu
∈[0, 1]
. Furthermore, we require that the normals match too.S =T S
T
T S
u u
v v
Contents
JJ II
J I
Page24of29
Go Back
Full Screen
The conditions
The condition S(u, 0) = T (u, 1) is easily satisfied by having the
bottomrow of S match the
toprow of T .
This will also ensure that S
u= T
usince both are tangents to the same curve.
Lets examine the normal condition next. S
u×S
v ≡T
u×T
v, is achieved if we force S
vto be a multiple of T
v. This is forced by fixing a multiple, say α and requiring that:
S[i, 1]
−S[i, 0] = α(T [i, n]
−T [i, n
−1])
Title Page
Contents
JJ II
J I
Page25of29
Go Back
Full Screen
Close
Quit
Schematically
S[0,0] ... S[m,0]
S[0,n] ... S[m,n]
T[0,0] ... T[m,0]
T[0,n] ... T[m,n]
S[0,1] ... S[m,1]
T[0,n−1] ... T[m,n−1]
row n row n−1 row 0 row 1
row 0 row n
row 0 row 1 row n−1
=
= row n
Contents
JJ II
J I
Page26of29
Go Back
Full Screen
A surface, if part of a solid, has at every point, an outward normal.
Thus, given a
(u
0, v
0)
we are now faced with specifying uniformly an out- ward normal atS(u
0, v
0)
!.u v
(0,0) (1,0)
(1,1) (0,1)
v
u0
0 S(u ,v )
v=v0 S
0 0
u=u0
S
Su
v
N
Consider the figure above. At the point
S(u
0, v
0)
, we have the two tangentsTitle Page
Contents
JJ II
J I
Page27of29
Go Back
Full Screen
Close
Quit
The Sign of the Normal
We claim that if the outward normal at S(u
0, v
0) is, say,
−N =
−(S
u×S
v), then it is so at
every u, v a.
Thus all that needs to be stored is a
sign ∈ {+1,−1}. The normal at any point S(u, v) is given by
sign · (Su × Sv)
Proof: Let U (u, v) be the unit outward normal which exists! Clearly, U (u, v) is a smooth function on the surface.
Let M (u, v) = sign
· |SSuu××SSvv|. We see that (i)
M(u, v)is a smooth function on
u, v, and (ii) M(u, v) is normal at S(u, v).aprovidedSu×Svis never zero
Contents
JJ II
J I
Page28of29
Go Back
Full Screen
Continued
Thus at all points (u, v), the vectors M (u, v) and U (u, v) are
collinear.Now the proof goes in the following 3 steps:
•
Since both are unit, we have M (u, v)/U (u, v)
∈ ±1.
•
Since both U and M are smooth and unit, M (u, v)/U (u, v) must be
uniformlyeither +1 or
−1.
•
But we know that at (u
0, v
0) it is +1 and thus M (u, v) = U (u, v).
2
Title Page
Contents
JJ II
J I
Page29of29
Go Back
Full Screen
Close
Quit