Graphics Reference
In-Depth Information
uv
×
R
w
v
u
P
T
S
Figure 4.4.
We start with three points, Rx
R
y
R
z
R
S x
S
y
S
z
S
, and T x
T
y
T
z
T
, as shown
in Fig. 4.4, and create two vectors,
u
=
−
RT. The three points are assumed to be
in a counterclockwise sequence viewed from the direction of the surface normal. The vector
product
u
=
RS and
v
×
v
provides a vector normal to the plane containing the points:
i j k
x
u
y
u
z
u
x
v
y
v
z
v
u
×
v
=
=
−
RP.
We now take another point, P xyz, which is on the plane, and form a vector,
w
Therefore, the scalar product
w
0. This condition can be expressed as a determinant
and converted into the general equation of a plane:
·
u
×
v
=
x
w
y
w
z
w
x
u
y
u
z
u
x
v
w
·
u
×
v
=
=
0
(4.5)
y
v
z
v
Expanding Eq. (4.5), we obtain
x
w
+
y
w
+
z
w
=
y
u
z
u
y
v
z
v
z
u
x
u
z
v
x
v
x
u
y
u
x
v
y
v
0
which becomes
x
R
+
y
R
+
z
R
=
y
S
−
y
R
z
S
−
z
R
z
S
−
z
R
x
S
−
x
R
x
S
−
x
R
y
S
−
y
R
x
−
y
−
z
−
0
y
T
−
y
R
z
T
−
z
R
z
T
−
z
R
x
T
−
x
R
x
T
−
x
R
y
T
−
y
R
This can be arranged in the Cartesian form of the line equation
ax
+
by
+
cz
=
d
where
1 y
R
z
R
1 y
S
z
S
1 y
T
z
T
y
S
−
y
R
z
S
−
z
R
a
=
or a
=
y
T
−
y
R
z
T
−
z
R