Graphics Reference
In-Depth Information
3.3.8
Algebraic Identities Involving Scalar Triple Products
Given vectors
u
,
v
,
w
,
x
,
y
, and
z
, the following identities hold for scalar triple
products:
[
uvw
]
=
[
vwu
]
=
[
wuv
]
=−
[
uwv
]
=−
[
vuw
]
=−
[
wvu
]
=
=
[
uuv
]
[
vuv
]
0
[
uvw
]
2
=
[(
u
×
v
)(
v
×
w
)(
w
×
u
)]
u
[
vwx
]
−
v
[
wxu
]
+
w
[
xuv
]
−
x
[
uvw
]
=
0
(
u
×
v
)
×
(
w
×
x
)
=
v
[
uwx
]
−
u
[
vwx
]
(
u
z
)
=
vyz
[
uwx
]
−
uyz
[
vwx
]
×
v
)(
w
×
x
)(
y
×
[(
u
+
v
)(
v
+
w
)(
w
+
u
)]
=
2 [
uvw
]
u
·
xu
·
yu
·
z
[
uvw
]
xyz
=
v
·
xv
·
yv
·
z
w
·
xw
·
yw
·
z
[(
u
−
x
)(
v
−
x
)(
w
−
x
)]
=
[
uvw
]
−
[
uvx
]
−
[
uxw
]
−
[
xvw
]
=
[(
u
−
x
)
vw
]
−
[(
v
−
w
)
xu
]
3.4
Barycentric Coordinates
A concept useful in several different intersection tests is that of
barycentric coordinates
.
Barycentric coordinates parameterize the space that can be formed as a weighted
combination of a set of reference points. As a simple example of barycentric coor-
dinates, consider two points,
A
and
B
. A point
P
on the line between them can be
expressed as
P
=
A
+
t
(
B
−
A
)
=
(1
−
t
)
A
+
tB
or simply as
P
=
uA
+
vB
, where
u
1. Written in
the latter way, (
u
,
v
) are the barycentric coordinates of
P
with respect to
A
and
B
. The
barycentric coordinates of
A
are (1, 0), and for
B
they are (0, 1).
The prefix
bary
comes from Greek, meaning weight, and its use as a prefix is
explained by considering
u
and
v
as weights placed at the endpoints
A
and
B
of the
segment
AB,
respectively. Then, the point
Q
dividing the segment in the ratio
v
+
v
=
1.
P
is on the segment
AB
if and only if 0
≤
u
≤
1 and 0
≤
v
≤
u
is the
centroid
or
barycenter
: the center of gravity of the weighted segment and the
position at which it must be supported to be balanced.
A typical application of barycentric coordinates is to parameterize triangles (or
the planes of the triangles). Consider a triangle
ABC
specified by three noncollinear
points
A
,
B
, and
C
. Any point
P
in the plane of the points can then be uniquely
expressed as
P
:
=
+
+
+
+
=
1.
The triplet (
u
,
v
,
w
) corresponds to the barycentric coordinates of the point. For the
uA
vB
wC
for some constants
u
,
v
, and
w
, where
u
v
w