Graphics Reference
In-Depth Information
The third step is to find the point of intersection using
x a
x b =
x s
x t
y a
y b =
y s
y t
z a
z b =
z s
z t
Therefore,
2
+
2
=
2
0
=
1
1
2
2
=
0
2
and
+
=
1
=
+
=
1
Therefore,
1
2
1
2
=
and
=
Substituting and in Eq. (6.14), we get
=
+
+
1
2 2 i
+
=
+
3
2 j
+
p
j
2 k
j
2 k
i
k
Double checking gives
1
2
3
2 j
q
=
2 i
+
j
+
2 i
+
j
+
2 k
=
i
+
+
k
and the point of intersection is 1 1 2 1 , which is correct.
6.7 A line intersecting a plane
There are two configurations of a line and plane: either they intersect or they are parallel, and
we must be able to detect both possibilities. The plane could be defined either using a plane
equation or using two vectors. As the former is the most probable format, let's proceed with
this.
We define the plane equation using the Cartesian form
ax
+
by
+
cz
=
d
where the normal vector n is given by
n
=
a i
+
b j
+
c k
 
Search WWH ::




Custom Search