Graphics Reference
In-Depth Information
10.5 Intersection of a Circle with a Straight Line
The equation of a circle has already been given in the previous chapter, so we
will now consider how to compute its intersection with a straight line.
We begin by testing the equation of a circle with the normal form of the
line equation:
x
2
+
y
2
=
r
2
and
y
=
mx
+
c
By substituting the line equation in the circle's equation we discover the two
intersection points:
r
2
(1 +
m
2
)
x
1
,
2
=
−
mc
±
−
c
2
1+
m
2
m
r
2
(1 +
m
2
)
y
1
,
2
=
c
±
−
c
2
(10.57)
1+
m
2
Let's test this result with the scenario shown in Figure 10.27. Using the normal
form of the line equation, we have
y
=
x
+1 where
m
=1and
c
=1
Substituting these values in (10.57) yields
x
1
,
2
=
−
1
,
0and
y
1
,
2
=0
,
1
The actual points of intersection are (
−
1, 0) and (0,1).
Y
y
=
x
+ 1
x
−
y
+ 1 = 0
−
0.707
x
+ 0.707y
−
0.707 = 0
1
X
−
1
1
x
2
+
y
2
=
r
2
Fig. 10.27.
The intersection of a circle with a line defined in its normal form, general
form, and the Hessian normal form.