Graphics Reference
In-Depth Information
and applying them to the ray. But before so doing, we must remember that vectors are rather
sensitive to transforms.
For example, the above line equation contains two types of vector: t is a position vector with
its tail fixed at the origin and its head locating some point on the ray, typically T; while v is
the ray's direction in terms of Cartesian displacements. Both types of vector behave correctly
when scaled and rotated, but only t can be translated. Therefore, the ray must be transformed
as follows:
t =
S 1
R 1
T 1
·
·
·
t
and
v =
S 1
R 1
·
·
v
The transformed ray becomes
t +
v
p
=
with which we can test for a possible intersection with the untransformed object. So, with this
in mind, some of the following analyses will only consider objects centered about the origin,
and the relative juxtaposition between ray and object is achieved by transforming the ray.
No attempt is made in the following sections to develop fast algorithms. The underlying goals
are to identify strategies and to reveal patterns in solutions.
Let's begin this survey with the simple case of two intersecting lines in
2 .
R
6.2 Two intersecting lines in R
2
2 , there are three possible orientation scenarios: they intersect, they are
parallel, or they are identical. We begin by assuming that they intersect, as shown in Fig. 6.1.
The lines are defined using a direction vector and a known point on the line. The point of
intersection P must satisfy both equations, and our task is to compute the value of and .
Given two lines in
R
Y
R
b
P
r
a
S
p
s
X
Figure 6.1.
 
Search WWH ::




Custom Search