Graphics Reference
In-Depth Information
10.6.1 Equation of a Straight Line
We start by using a vector b to define the orientation of the line, and a
point a in space through which the vector passes. This scenario is shown in
Figure 10.28. Given another point P on the line we can define a vector t b
between a and P ,where t is some scalar. The position vector p is given by
p = a + t b
(10.60)
from which we can obtain the coordinates of the point p :
x p = x a + tx b
y p = y a + ty b
z p = z a + tz b
(10.61)
For example, if b =[123] T and a =(2 , 3 , 4), then by setting t =1wecan
identify a second point on the line:
x p =2+1=3
y p =3+2=5
z p =4+3=7
In fact, by using different values of t we can slide up and down the line with
ease.
If we already have two points in space P 1 and P 2 , such as the vertices of
an edge, we can represent the line equation using the above vector technique:
p = p 1 + t ( p 2
p 1 )
Y
P
t b
a
p = a + t b
b
X
a
Z
Fig. 10.28. The line equation is based upon the point a and the vector b .
Search WWH ::




Custom Search