[go: up one dir, main page]

TOPICS
Search

Circle-Line Intersection


CircleLineIntersection

An (infinite) line determined by two points (x_1,y_1) and (x_2,y_2) may intersect a circle of radius r and center (0, 0) in two imaginary points (left figure), a degenerate single point (corresponding to the line being tangent to the circle; middle figure), or two real points (right figure).

In geometry, a line meeting a circle in exactly one point is known as a tangent line, while a line meeting a circle in exactly two points in known as a secant line (Rhoad et al. 1984, p. 429).

Defining

d_x=x_2-x_1
(1)
d_y=y_2-y_1
(2)
d_r=sqrt(d_x^2+d_y^2)
(3)
D=|x_1 x_2; y_1 y_2|=x_1y_2-x_2y_1
(4)

gives the points of intersection as

x=(Dd_y+/-sgn^*(d_y)d_xsqrt(r^2d_r^2-D^2))/(d_r^2)
(5)
y=(-Dd_x+/-|d_y|sqrt(r^2d_r^2-D^2))/(d_r^2),
(6)

where the function sgn^*(x) is defined as

 sgn^*(x)={-1   for x<0; 1   otherwise.
(7)

The discriminant

 Delta=r^2d_r^2-D^2
(8)

therefore determines the incidence of the line and circle, as summarized in the following table.

Deltaincidence
Delta<0no intersection
Delta=0tangent
Delta>0intersection

See also

Circle, Circle-Circle Intersection, Line, Line-Line Intersection, Secant Line, Tangent Line

Explore with Wolfram|Alpha

WolframAlpha

More things to try:

References

Rhoad, R.; Milauskas, G.; and Whipple, R. Geometry for Enjoyment and Challenge, rev. ed. Evanston, IL: McDougal, Littell & Company, 1984.

Referenced on Wolfram|Alpha

Circle-Line Intersection

Cite this as:

Weisstein, Eric W. "Circle-Line Intersection." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Circle-LineIntersection.html

Subject classifications