Graphics Reference
In-Depth Information
interval
[
p
,
q
]
, define corresponding barycentric coordinates. How are
α
pq
(
x
)
and
α
p
,
q
(
x
)
related?
Exercise 9.9:
Suppose you have a nondegenerate triangle in 3-space with ver-
tices
P
0
,
P
1
, and
P
2
so that
v
1
=
P
1
−
P
0
and
v
2
=
P
2
−
P
0
are nonzero and
nonparallel. Further, suppose that we have values
f
0
,
f
1
,
f
2
∈
R
associated with the
three vertices. Barycentric interpolation of these values over the triangle defines a
function that can be written in the form
f
(
P
)=
f
0
+(
P
−
P
0
)
·
w
(9.27)
for some vector
w
. We'll see this in two steps: First, we'll compute a possible
value for
w
, and then we'll show that if it has this value,
f
actually matches the
given values at the vertices.
(a) Show that the vector
w
must satisfy
v
i
·
f
0
for
i
=
1, 2 for the function
defined by Equation 9.27 to satisfy
f
(
P
1
)=
f
1
and
f
(
P
2
)=
f
2
.
(b) Let
S
be the matrix whose columns are the vectors
v
1
and
v
2
. Show that the
conditions of part (a) can be rewritten in the form
S
T
w
=
f
1
−
w
=
f
i
−
,
f
0
(9.28)
f
2
−
f
0
and that therefore
w
must also satisfy
SS
T
w
=
S
f
1
−
.
f
0
(9.29)
f
2
−
f
0
(c) Explain why
SS
T
must be invertible.
(d) Conclude that
w
=(
SS
T
)
−
1
S
f
1
−
.
f
0
f
2
−
f
0
(e) Verify that if we use this formula for
w
, then
f
(
P
i
)=
f
i
for
i
=
0, 1, 2.
(f) Suppose that
w
=
w
+
v
2
is the normal vector to the
triangle. Show that we can replace
w
with
w
in the formula for
f
and still have
f
(
P
i
)=
f
i
for
i
=
0, 1, 2.
α
n
, where
n
=
v
1
×