Graphics Reference
In-Depth Information
Using Eq. (6.6), we can state that
x
P
+
y
P
=
r
2
which is identical to
·
=
r
2
p
p
or
r
2
t
+
v
·
t
+
v
=
Expanding and simplifying gives
2
v
r
2
t
·
t
+
2
t
·
v
+
·
v
=
But as
v
is a unit vector
v
·
v
=
1, and so, therefore,
2
2
r
2
+
2
t
·
v
+
t
−
=
0
which is a quadratic in , and solved using
√
B
2
=
−
B
±
−
4AC
2A
where
2
=
=
·
=
−
r
2
A
1 B
2
t
v
C
t
Therefore,
4
t
4
r
2
v
2
2
−
2
t
·
v
±
·
−
t
−
=
2
t
v
2
2
=−
t
·
v
±
·
−
t
+
r
2
The discriminant is simplified as follows:
v
2
2
r
2
x
t
x
v
+
y
t
y
v
+
x
t
−
y
t
+
r
2
t
·
−
t
+
=
2x
t
x
v
y
t
y
v
−
x
t
x
v
−
1
+
y
t
y
v
−
1
+
r
2
=
2x
t
x
v
y
t
y
v
+
x
t
y
v
−
y
t
x
v
+
r
2
=−
2x
t
x
v
y
t
y
v
+
−
x
t
y
v
+
2x
t
x
v
y
t
y
v
r
2
y
t
x
v
−
=
2
r
2
=
−
x
v
y
t
−
x
t
y
v
x
v
y
v
x
t
y
t
v
2
2
r
2
r
2
t
·
−
t
+
=
−
and
2
x
v
y
v
x
t
y
t
=−
x
t
x
v
+
y
t
y
v
±
r
2
−
(6.7)
The value of the discriminant of Eq. (6.7) determines whether the line intersects, is tangential,
or misses the circle: