Graphics Reference
In-Depth Information
Substituting Eq. (3.35) in Eq. (3.37), we get
=
·
+
·
c
n
p
n
n
which enables us to define :
c
n
·
p
c
n
·
p
=
n =
2
(3.38)
n
·
n
Substituting in Eq. (3.36) gives
c
n
n
·
p
q
=
p
+
(3.39)
2
n
The distance
PQ
=
n
If n is a unit vector
n , Eq. (3.39) simplifies to
ˆ
q
=
p
+
c
−ˆ
n
·
p
n
ˆ
and the distance
PQ
=
c
−ˆ
n
·
p
Equation (3.39) covers all positions for P, including the origin. Therefore, if we make p a null
vector,
c
n
q
=
2
n
which is identical to Eq. (3.30)!
Let's test Eq. (3.39) with a predictable example, as shown in Fig. 3.20.
Y
P (1,1)
p
1
n
Q
q
O
X
1
Figure 3.20.
P has coordinates 11, which means that Q has coordinates 2
2 :
1
p
=
i
+
j
The line equation is
x
+
y
=
1
 
Search WWH ::




Custom Search