![Intersection (geometry)](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly91cGxvYWQud2lraW1lZGlhLm9yZy93aWtpcGVkaWEvY29tbW9ucy90aHVtYi81LzU1L1NjaG5pdHRwdW5rdC0yZy5zdmcvMTYwMHB4LVNjaG5pdHRwdW5rdC0yZy5zdmcucG5n.png )
In geometry, an intersection is a point, line, or curve common to two or more objects (such as lines, curves, planes, and surfaces). The simplest case in Euclidean geometry is the line–line intersection between two distinct lines, which either is one point (sometimes called a vertex) or does not exist (if the lines are parallel). Other types of geometric intersection include:
- Line–plane intersection
- Line–sphere intersection
- Intersection of a polyhedron with a line
- Line segment intersection
- Intersection curve
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpODFMelUxTDFOamFHNXBkSFJ3ZFc1cmRDMHlaeTV6ZG1jdk1qQXdjSGd0VTJOb2JtbDBkSEIxYm10MExUSm5Mbk4yWnk1d2JtYz0ucG5n.png)
Determination of the intersection of flats – linear geometric objects embedded in a higher-dimensional space – is a simple task of linear algebra, namely the solution of a system of linear equations. In general the determination of an intersection leads to non-linear equations, which can be solved numerically, for example using Newton iteration. Intersection problems between a line and a conic section (circle, ellipse, parabola, etc.) or a quadric (sphere, cylinder, hyperboloid, etc.) lead to quadratic equations that can be easily solved. Intersections between quadrics lead to quartic equations that can be solved algebraically.
On a plane
Two lines
For the determination of the intersection point of two non-parallel lines
one gets, from Cramer's rule or by substituting out a variable, the coordinates of the intersection point :
(If the lines are parallel and these formulas cannot be used because they involve dividing by 0.)
Two line segments
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpOWtMMlEzTDBsekxXeHBibVZ6WldkdExuTjJaeTh6TURCd2VDMUpjeTFzYVc1bGMyVm5iUzV6ZG1jdWNHNW4ucG5n.png)
For two non-parallel line segments and
there is not necessarily an intersection point (see diagram), because the intersection point
of the corresponding lines need not to be contained in the line segments. In order to check the situation one uses parametric representations of the lines:
The line segments intersect only in a common point of the corresponding lines if the corresponding parameters
fulfill the condition
. The parameters
are the solution of the linear system
It can be solved for s and t using Cramer's rule (see above). If the condition is fulfilled one inserts
or
into the corresponding parametric representation and gets the intersection point
.
Example: For the line segments and
one gets the linear system
and . That means: the lines intersect at point
.
Remark: Considering lines, instead of segments, determined by pairs of points, each condition can be dropped and the method yields the intersection point of the lines (see above).
A line and a circle
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpODVMemszTDBsekxXTnBjbU5zWlMxc2FXNWxMWE11YzNabkx6SXlNSEI0TFVsekxXTnBjbU5zWlMxc2FXNWxMWE11YzNabkxuQnVadz09LnBuZw==.png)
For the intersection of
- line
and circle
one solves the line equation for x or y and substitutes it into the equation of the circle and gets for the solution (using the formula of a quadratic equation) with
if If this condition holds with strict inequality, there are two intersection points; in this case the line is called a secant line of the circle, and the line segment connecting the intersection points is called a chord of the circle.
If holds, there exists only one intersection point and the line is tangent to the circle. If the weak inequality does not hold, the line does not intersect the circle.
If the circle's midpoint is not the origin, see. The intersection of a line and a parabola or hyperbola may be treated analogously.
Two circles
The determination of the intersection points of two circles
can be reduced to the previous case of intersecting a line and a circle. By subtraction of the two given equations one gets the line equation:
This special line is the radical line of the two circles.
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpODNMemRqTDBsekxXTnBjbU5zWlMxamFYSmpiR1V0TW5ndWMzWm5MekkyTUhCNExVbHpMV05wY21Oc1pTMWphWEpqYkdVdE1uZ3VjM1puTG5CdVp3PT0ucG5n.png)
Special case :
In this case the origin is the center of the first circle and the second center lies on the x-axis (s. diagram). The equation of the radical line simplifies to and the points of intersection can be written as
with
In case of the circles have no points in common.
In case of the circles have one point in common and the radical line is a common tangent.
Any general case as written above can be transformed by a shift and a rotation into the special case.
The intersection of two disks (the interiors of the two circles) forms a shape called a lens.
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpODFMelZoTDBsekxXTnBjbU5zWlMxbGJHeHBjSE5sTFhNdWMzWm5Mekl5TUhCNExVbHpMV05wY21Oc1pTMWxiR3hwY0hObExYTXVjM1puTG5CdVp3PT0ucG5n.png)
Two conic sections
The problem of intersection of an ellipse/hyperbola/parabola with another conic section leads to a system of quadratic equations, which can be solved in special cases easily by elimination of one coordinate. Special properties of conic sections may be used to obtain a solution. In general the intersection points can be determined by solving the equation by a Newton iteration. If a) both conics are given implicitly (by an equation) a 2-dimensional Newton iteration b) one implicitly and the other parametrically given a 1-dimensional Newton iteration is necessary. See next section.
Two smooth curves
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpOHpMek0yTDFOamFHNXBkSFJ3TW1RdGRISmhibk4yTFhNdWMzWm5MekkxTUhCNExWTmphRzVwZEhSd01tUXRkSEpoYm5OMkxYTXVjM1puTG5CdVp3PT0ucG5n.png)
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpOW1MMlkzTDBKbGNuVmxhSEl0YzJOb2JtbDBkQzF6TG5OMlp5OHpOVEJ3ZUMxQ1pYSjFaV2h5TFhOamFHNXBkSFF0Y3k1emRtY3VjRzVuLnBuZw==.png)
Two curves in (two-dimensional space), which are continuously differentiable (i.e. there is no sharp bend), have an intersection point, if they have a point of the plane in common and have at this point (see diagram):
- a) different tangent lines (transversal intersection, after transversality), or
- b) the tangent line in common and they are crossing each other (touching intersection, after tangency).
If both the curves have a point S and the tangent line there in common but do not cross each other, they are just touching at point S.
Because touching intersections appear rarely and are difficult to deal with, the following considerations omit this case. In any case below all necessary differential conditions are presupposed. The determination of intersection points always leads to one or two non-linear equations which can be solved by Newton iteration. A list of the appearing cases follows:
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpOWtMMlF4TDFOamFHNXBkSFJ3TW1RdGNHa3RjeTV6ZG1jdk1qSXdjSGd0VTJOb2JtbDBkSEF5WkMxd2FTMXpMbk4yWnk1d2JtYz0ucG5n.png)
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpOHhMekZrTDFOamFHNXBkSFJ3TW1RdGFXa3RjeTV6ZG1jdk1qSXdjSGd0VTJOb2JtbDBkSEF5WkMxcGFTMXpMbk4yWnk1d2JtYz0ucG5n.png)
- If both curves are explicitly given:
, equating them yields the equation
- If both curves are parametrically given:
- Equating them yields two equations in two variables:
- If one curve is parametrically and the other implicitly given:
- This is the simplest case besides the explicit case. One has to insert the parametric representation of
into the equation
of curve
and one gets the equation:
- If both curves are implicitly given:
- Here, an intersection point is a solution of the system
Any Newton iteration needs convenient starting values, which can be derived by a visualization of both the curves. A parametrically or explicitly given curve can easily be visualized, because to any parameter t or x respectively it is easy to calculate the corresponding point. For implicitly given curves this task is not as easy. In this case one has to determine a curve point with help of starting values and an iteration. See .
Examples:
- 1:
and circle
(see diagram).
- The Newton iteration
for function
has to be done. As start values one can choose −1 and 1.5.
- The intersection points are: (−1.1073, −1.3578), (1.6011, 4.1046)
- The Newton iteration
- 2:
(see diagram).
- The Newton iteration
has to be performed, where
is the solution of the linear system
at point
. As starting values one can choose(−0.5, 1) and (1, −0.5).
- The linear system can be solved by Cramer's rule.
- The intersection points are (−0.3686, 0.9953) and (0.9953, −0.3686).
Two polygons
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpOWlMMkkyTDBsekxYQnZiSGxuY0c5c2VXY3RjeTV6ZG1jdk16QXdjSGd0U1hNdGNHOXNlV2R3YjJ4NVp5MXpMbk4yWnk1d2JtYz0ucG5n.png)
If one wants to determine the intersection points of two polygons, one can check the intersection of any pair of line segments of the polygons (see above). For polygons with many segments this method is rather time-consuming. In practice one accelerates the intersection algorithm by using window tests. In this case one divides the polygons into small sub-polygons and determines the smallest window (rectangle with sides parallel to the coordinate axes) for any sub-polygon. Before starting the time-consuming determination of the intersection point of two line segments any pair of windows is tested for common points. See.
In space (three dimensions)
In 3-dimensional space there are intersection points (common points) between curves and surfaces. In the following sections we consider transversal intersection only.
A line and a plane
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpODVMemxtTDFOamFHNXBkSFJ3TFdkbGNpMWxZaTF6TG5OMlp5OHlNakJ3ZUMxVFkyaHVhWFIwY0MxblpYSXRaV0l0Y3k1emRtY3VjRzVuLnBuZw==.png)
The intersection of a line and a plane in general position in three dimensions is a point.
Commonly a line in space is represented parametrically and a plane by an equation
. Inserting the parameter representation into the equation yields the linear equation
for parameter of the intersection point
.
If the linear equation has no solution, the line either lies on the plane or is parallel to it.
Three planes
If a line is defined by two intersecting planes and should be intersected by a third plane
, the common intersection point of the three planes has to be evaluated.
Three planes with linear independent normal vectors
have the intersection point
For the proof one should establish using the rules of a scalar triple product. If the scalar triple product equals to 0, then planes either do not have the triple intersection or it is a line (or a plane, if all three planes are the same).
A curve and a surface
![image](https://www.english.nina.az/wikipedia/image/aHR0cHM6Ly93d3cuZW5nbGlzaC5uaW5hLmF6L3dpa2lwZWRpYS9pbWFnZS9hSFIwY0hNNkx5OTFjR3h2WVdRdWQybHJhVzFsWkdsaExtOXlaeTkzYVd0cGNHVmthV0V2WTI5dGJXOXVjeTkwYUhWdFlpODVMemsxTDBsekxYQmpkWEoyWlMxcGMzVnlabUZqWlMxekxuTjJaeTh5TlRCd2VDMUpjeTF3WTNWeWRtVXRhWE4xY21aaFkyVXRjeTV6ZG1jdWNHNW4ucG5n.png)
Analogously to the plane case the following cases lead to non-linear systems, which can be solved using a 1- or 3-dimensional Newton iteration.
- parametric curve
and
- parametric surface
- parametric curve
and
- implicit surface
Example:
- parametric curve
and
- implicit surface
(s. picture).
- The intersection points are: (−0.8587, 0.7374, −0.6332), (0.8587, 0.7374, 0.6332).
A line–sphere intersection is a simple special case.
Like the case of a line and a plane, the intersection of a curve and a surface in general position consists of discrete points, but a curve may be partly or totally contained in a surface.
A line and a polyhedron
Two surfaces
Two transversally intersecting surfaces give an intersection curve. The most simple case is the intersection line of two non-parallel planes.
A sphere and a plane
When the intersection of a sphere and a plane is not empty or a single point, it is a circle. This can be seen as follows:
Let S be a sphere with center O, P a plane which intersects S. Draw OE perpendicular to P and meeting P at E. Let A and B be any two different points in the intersection. Then AOE and BOE are right triangles with a common side, OE, and hypotenuses AO and BO equal. Therefore, the remaining sides AE and BE are equal. This proves that all points in the intersection are the same distance from the point E in the plane P, in other words all points in the intersection lie on a circle C with center E. This proves that the intersection of P and S is contained in C. Note that OE is the axis of the circle.
Now consider a point D of the circle C. Since C lies in P, so does D. On the other hand, the triangles AOE and DOE are right triangles with a common side, OE, and legs EA and ED equal. Therefore, the hypotenuses AO and DO are equal, and equal to the radius of S, so that D lies in S. This proves that C is contained in the intersection of P and S.
As a corollary, on a sphere there is exactly one circle that can be drawn through three given points.
The proof can be extended to show that the points on a circle are all a common angular distance from one of its poles.
Compare also conic sections, which can produce ovals.
Two spheres
To show that a non-trivial intersection of two spheres is a circle, assume (without loss of generality) that one sphere (with radius ) is centered at the origin. Points on this sphere satisfy
Also without loss of generality, assume that the second sphere, with radius , is centered at a point on the positive x-axis, at distance
from the origin. Its points satisfy
The intersection of the spheres is the set of points satisfying both equations. Subtracting the equations gives
In the singular case , the spheres are concentric. There are two possibilities: if
, the spheres coincide, and the intersection is the entire sphere; if
, the spheres are disjoint and the intersection is empty. When a is nonzero, the intersection lies in a vertical plane with this x-coordinate, which may intersect both of the spheres, be tangent to both spheres, or external to both spheres. The result follows from the previous proof for sphere-plane intersections.
See also
- Line-plane intersection
- Line–sphere intersection
- Line-cylinder intersection
- Analytic geometry#Intersections
- Computational geometry
- Equation of a line
- Intersection (set theory)
- Intersection theory
Notes
- Erich Hartmann: Geometry and Algorithms for COMPUTER AIDED DESIGN. Lecture notes, Technische Universität Darmstadt, October 2003, p. 17
- Erich Hartmann: Geometry and Algorithms for COMPUTER AIDED DESIGN. Lecture notes, Technische Universität Darmstadt, October 2003, p. 33
- Erich Hartmann: CDKG: Computerunterstützte Darstellende und Konstruktive Geometrie. Lecture notes, TU Darmstadt, 1997, p. 79 (PDF; 3,4 MB)
- Erich Hartmann: Geometry and Algorithms for COMPUTER AIDED DESIGN. Lecture notes, Technische Universität Darmstadt, October 2003, p. 93
- Proof follows Hobbs, Prop. 304
- Hobbs, Prop. 308
- Hobbs, Prop. 310
References
- Hobbs, C.A. (1921). Solid Geometry. G.H. Kent. pp. 397 ff.
Further reading
- Haines, Eric (June 6, 2021). "Intersections (Ray Tracing Resources Page)". Real-Time Rendering. Retrieved December 14, 2023.
a grid of intersection routines for various popular objects, pointing to resources in books and on the web.
- Nicholas M. Patrikalakis and Takashi Maekawa, Shape Interrogation for Computer Aided Design and Manufacturing, Springer, 2002, ISBN 3540424547, 9783540424543, pp. 408. [1]
- Sykes, M.; Comstock, C.E. (1922). Solid Geometry. Rand McNally. pp. 81 ff.
In geometry an intersection is a point line or curve common to two or more objects such as lines curves planes and surfaces The simplest case in Euclidean geometry is the line line intersection between two distinct lines which either is one point sometimes called a vertex or does not exist if the lines are parallel Other types of geometric intersection include Line plane intersection Line sphere intersection Intersection of a polyhedron with a line Line segment intersection Intersection curveThe red dot represents the point at which the two lines intersect Determination of the intersection of flats linear geometric objects embedded in a higher dimensional space is a simple task of linear algebra namely the solution of a system of linear equations In general the determination of an intersection leads to non linear equations which can be solved numerically for example using Newton iteration Intersection problems between a line and a conic section circle ellipse parabola etc or a quadric sphere cylinder hyperboloid etc lead to quadratic equations that can be easily solved Intersections between quadrics lead to quartic equations that can be solved algebraically On a planeTwo lines For the determination of the intersection point of two non parallel lines a1x b1y c1 a2x b2y c2 displaystyle a 1 x b 1 y c 1 a 2 x b 2 y c 2 one gets from Cramer s rule or by substituting out a variable the coordinates of the intersection point xs ys displaystyle x s y s xs c1b2 c2b1a1b2 a2b1 ys a1c2 a2c1a1b2 a2b1 displaystyle x s frac c 1 b 2 c 2 b 1 a 1 b 2 a 2 b 1 quad y s frac a 1 c 2 a 2 c 1 a 1 b 2 a 2 b 1 If a1b2 a2b1 0 displaystyle a 1 b 2 a 2 b 1 0 the lines are parallel and these formulas cannot be used because they involve dividing by 0 Two line segments Intersection of two line segments For two non parallel line segments x1 y1 x2 y2 displaystyle x 1 y 1 x 2 y 2 and x3 y3 x4 y4 displaystyle x 3 y 3 x 4 y 4 there is not necessarily an intersection point see diagram because the intersection point x0 y0 displaystyle x 0 y 0 of the corresponding lines need not to be contained in the line segments In order to check the situation one uses parametric representations of the lines x s y s x1 s x2 x1 y1 s y2 y1 displaystyle x s y s x 1 s x 2 x 1 y 1 s y 2 y 1 x t y t x3 t x4 x3 y3 t y4 y3 displaystyle x t y t x 3 t x 4 x 3 y 3 t y 4 y 3 The line segments intersect only in a common point x0 y0 displaystyle x 0 y 0 of the corresponding lines if the corresponding parameters s0 t0 displaystyle s 0 t 0 fulfill the condition 0 s0 t0 1 displaystyle 0 leq s 0 t 0 leq 1 The parameters s0 t0 displaystyle s 0 t 0 are the solution of the linear system s x2 x1 t x4 x3 x3 x1 displaystyle s x 2 x 1 t x 4 x 3 x 3 x 1 s y2 y1 t y4 y3 y3 y1 displaystyle s y 2 y 1 t y 4 y 3 y 3 y 1 It can be solved for s and t using Cramer s rule see above If the condition 0 s0 t0 1 displaystyle 0 leq s 0 t 0 leq 1 is fulfilled one inserts s0 displaystyle s 0 or t0 displaystyle t 0 into the corresponding parametric representation and gets the intersection point x0 y0 displaystyle x 0 y 0 Example For the line segments 1 1 3 2 displaystyle 1 1 3 2 and 1 4 2 1 displaystyle 1 4 2 1 one gets the linear system 2s t 0 displaystyle 2s t 0 s 5t 3 displaystyle s 5t 3 and s0 311 t0 611 displaystyle s 0 tfrac 3 11 t 0 tfrac 6 11 That means the lines intersect at point 1711 1411 displaystyle tfrac 17 11 tfrac 14 11 Remark Considering lines instead of segments determined by pairs of points each condition 0 s0 t0 1 displaystyle 0 leq s 0 t 0 leq 1 can be dropped and the method yields the intersection point of the lines see above A line and a circle Line circle intersection For the intersection of line ax by c displaystyle ax by c and circle x2 y2 r2 displaystyle x 2 y 2 r 2 one solves the line equation for x or y and substitutes it into the equation of the circle and gets for the solution using the formula of a quadratic equation x1 y1 x2 y2 displaystyle x 1 y 1 x 2 y 2 with x1 2 ac br2 a2 b2 c2a2 b2 displaystyle x 1 2 frac ac pm b sqrt r 2 a 2 b 2 c 2 a 2 b 2 y1 2 bc ar2 a2 b2 c2a2 b2 displaystyle y 1 2 frac bc mp a sqrt r 2 a 2 b 2 c 2 a 2 b 2 if r2 a2 b2 c2 gt 0 displaystyle r 2 a 2 b 2 c 2 gt 0 If this condition holds with strict inequality there are two intersection points in this case the line is called a secant line of the circle and the line segment connecting the intersection points is called a chord of the circle If r2 a2 b2 c2 0 displaystyle r 2 a 2 b 2 c 2 0 holds there exists only one intersection point and the line is tangent to the circle If the weak inequality does not hold the line does not intersect the circle If the circle s midpoint is not the origin see The intersection of a line and a parabola or hyperbola may be treated analogously Two circles The determination of the intersection points of two circles x x1 2 y y1 2 r12 x x2 2 y y2 2 r22 displaystyle x x 1 2 y y 1 2 r 1 2 quad x x 2 2 y y 2 2 r 2 2 can be reduced to the previous case of intersecting a line and a circle By subtraction of the two given equations one gets the line equation 2 x2 x1 x 2 y2 y1 y r12 x12 y12 r22 x22 y22 displaystyle 2 x 2 x 1 x 2 y 2 y 1 y r 1 2 x 1 2 y 1 2 r 2 2 x 2 2 y 2 2 This special line is the radical line of the two circles Intersection of two circles with centers on the x axis their radical line is dark red Special case x1 y1 y2 0 displaystyle x 1 y 1 y 2 0 In this case the origin is the center of the first circle and the second center lies on the x axis s diagram The equation of the radical line simplifies to 2x2x r12 r22 x22 displaystyle 2x 2 x r 1 2 r 2 2 x 2 2 and the points of intersection can be written as x0 y0 displaystyle x 0 pm y 0 with x0 r12 r22 x222x2 y0 r12 x02 displaystyle x 0 frac r 1 2 r 2 2 x 2 2 2x 2 quad y 0 sqrt r 1 2 x 0 2 In case of r12 lt x02 displaystyle r 1 2 lt x 0 2 the circles have no points in common In case of r12 x02 displaystyle r 1 2 x 0 2 the circles have one point in common and the radical line is a common tangent Any general case as written above can be transformed by a shift and a rotation into the special case The intersection of two disks the interiors of the two circles forms a shape called a lens circle ellipse intersectionTwo conic sections The problem of intersection of an ellipse hyperbola parabola with another conic section leads to a system of quadratic equations which can be solved in special cases easily by elimination of one coordinate Special properties of conic sections may be used to obtain a solution In general the intersection points can be determined by solving the equation by a Newton iteration If a both conics are given implicitly by an equation a 2 dimensional Newton iteration b one implicitly and the other parametrically given a 1 dimensional Newton iteration is necessary See next section Two smooth curves A transversal intersection of two curvestouching intersection left touching right Two curves in R2 displaystyle mathbb R 2 two dimensional space which are continuously differentiable i e there is no sharp bend have an intersection point if they have a point of the plane in common and have at this point see diagram a different tangent lines transversal intersection after transversality or b the tangent line in common and they are crossing each other touching intersection after tangency If both the curves have a point S and the tangent line there in common but do not cross each other they are just touching at point S Because touching intersections appear rarely and are difficult to deal with the following considerations omit this case In any case below all necessary differential conditions are presupposed The determination of intersection points always leads to one or two non linear equations which can be solved by Newton iteration A list of the appearing cases follows intersection of a parametric curve and an implicit curveintersection of two implicit curvesIf both curves are explicitly given y f1 x y f2 x displaystyle y f 1 x y f 2 x equating them yields the equationf1 x f2 x displaystyle f 1 x f 2 x dd If both curves are parametrically given C1 x1 t y1 t C2 x2 s y2 s displaystyle C 1 x 1 t y 1 t C 2 x 2 s y 2 s Equating them yields two equations in two variables x1 t x2 s y1 t y2 s displaystyle x 1 t x 2 s y 1 t y 2 s dd If one curve is parametrically and the other implicitly given C1 x1 t y1 t C2 f x y 0 displaystyle C 1 x 1 t y 1 t C 2 f x y 0 This is the simplest case besides the explicit case One has to insert the parametric representation of C1 displaystyle C 1 into the equation f x y 0 displaystyle f x y 0 of curve C2 displaystyle C 2 and one gets the equation f x1 t y2 t 0 displaystyle f x 1 t y 2 t 0 dd If both curves are implicitly given C1 f1 x y 0 C2 f2 x y 0 displaystyle C 1 f 1 x y 0 C 2 f 2 x y 0 Here an intersection point is a solution of the systemf1 x y 0 f2 x y 0 displaystyle f 1 x y 0 f 2 x y 0 dd Any Newton iteration needs convenient starting values which can be derived by a visualization of both the curves A parametrically or explicitly given curve can easily be visualized because to any parameter t or x respectively it is easy to calculate the corresponding point For implicitly given curves this task is not as easy In this case one has to determine a curve point with help of starting values and an iteration See Examples 1 C1 t t3 displaystyle C 1 t t 3 and circle C2 x 1 2 y 1 2 10 0 displaystyle C 2 x 1 2 y 1 2 10 0 see diagram The Newton iteration tn 1 tn f tn f tn displaystyle t n 1 t n frac f t n f t n for functionf t t 1 2 t3 1 2 10 displaystyle f t t 1 2 t 3 1 2 10 has to be done As start values one can choose 1 and 1 5 dd The intersection points are 1 1073 1 3578 1 6011 4 1046 dd 2 C1 f1 x y x4 y4 1 0 displaystyle C 1 f 1 x y x 4 y 4 1 0 C2 f2 x y x 0 5 2 y 0 5 2 1 0 displaystyle C 2 f 2 x y x 0 5 2 y 0 5 2 1 0 see diagram The Newton iteration xn 1yn 1 xn dxyn dy displaystyle x n 1 choose y n 1 x n delta x choose y n delta y has to be performed where dxdy displaystyle delta x choose delta y is the solution of the linear system f1 x f1 y f2 x f2 y dxdy f1 f2 displaystyle begin pmatrix frac partial f 1 partial x amp frac partial f 1 partial y frac partial f 2 partial x amp frac partial f 2 partial y end pmatrix delta x choose delta y f 1 choose f 2 at point xn yn displaystyle x n y n As starting values one can choose 0 5 1 and 1 0 5 dd The linear system can be solved by Cramer s rule The intersection points are 0 3686 0 9953 and 0 9953 0 3686 dd Two polygons intersection of two polygons window test If one wants to determine the intersection points of two polygons one can check the intersection of any pair of line segments of the polygons see above For polygons with many segments this method is rather time consuming In practice one accelerates the intersection algorithm by using window tests In this case one divides the polygons into small sub polygons and determines the smallest window rectangle with sides parallel to the coordinate axes for any sub polygon Before starting the time consuming determination of the intersection point of two line segments any pair of windows is tested for common points See In space three dimensions In 3 dimensional space there are intersection points common points between curves and surfaces In the following sections we consider transversal intersection only A line and a plane Line plane intersection The intersection of a line and a plane in general position in three dimensions is a point Commonly a line in space is represented parametrically x t y t z t displaystyle x t y t z t and a plane by an equation ax by cz d displaystyle ax by cz d Inserting the parameter representation into the equation yields the linear equation ax t by t cz t d displaystyle ax t by t cz t d for parameter t0 displaystyle t 0 of the intersection point x t0 y t0 z t0 displaystyle x t 0 y t 0 z t 0 If the linear equation has no solution the line either lies on the plane or is parallel to it Three planes If a line is defined by two intersecting planes ei n i x di i 1 2 displaystyle varepsilon i vec n i cdot vec x d i i 1 2 and should be intersected by a third plane e3 n 3 x d3 displaystyle varepsilon 3 vec n 3 cdot vec x d 3 the common intersection point of the three planes has to be evaluated Three planes ei n i x di i 1 2 3 displaystyle varepsilon i vec n i cdot vec x d i i 1 2 3 with linear independent normal vectors n 1 n 2 n 3 displaystyle vec n 1 vec n 2 vec n 3 have the intersection point p 0 d1 n 2 n 3 d2 n 3 n 1 d3 n 1 n 2 n 1 n 2 n 3 displaystyle vec p 0 frac d 1 vec n 2 times vec n 3 d 2 vec n 3 times vec n 1 d 3 vec n 1 times vec n 2 vec n 1 cdot vec n 2 times vec n 3 For the proof one should establish n i p 0 di i 1 2 3 displaystyle vec n i cdot vec p 0 d i i 1 2 3 using the rules of a scalar triple product If the scalar triple product equals to 0 then planes either do not have the triple intersection or it is a line or a plane if all three planes are the same A curve and a surface intersection of curve t t2 t3 displaystyle t t 2 t 3 with surface x4 y4 z4 1 displaystyle x 4 y 4 z 4 1 Analogously to the plane case the following cases lead to non linear systems which can be solved using a 1 or 3 dimensional Newton iteration parametric curve C x t y t z t displaystyle C x t y t z t andparametric surface S x u v y u v z u v displaystyle S x u v y u v z u v parametric curve C x t y t z t displaystyle C x t y t z t andimplicit surface S f x y z 0 displaystyle S f x y z 0 Example parametric curve C t t2 t3 displaystyle C t t 2 t 3 and implicit surface S x4 y4 z4 1 0 displaystyle S x 4 y 4 z 4 1 0 s picture The intersection points are 0 8587 0 7374 0 6332 0 8587 0 7374 0 6332 A line sphere intersection is a simple special case Like the case of a line and a plane the intersection of a curve and a surface in general position consists of discrete points but a curve may be partly or totally contained in a surface A line and a polyhedron Two surfaces Two transversally intersecting surfaces give an intersection curve The most simple case is the intersection line of two non parallel planes A sphere and a plane When the intersection of a sphere and a plane is not empty or a single point it is a circle This can be seen as follows Let S be a sphere with center O P a plane which intersects S Draw OE perpendicular to P and meeting P at E Let A and B be any two different points in the intersection Then AOE and BOE are right triangles with a common side OE and hypotenuses AO and BO equal Therefore the remaining sides AE and BE are equal This proves that all points in the intersection are the same distance from the point E in the plane P in other words all points in the intersection lie on a circle C with center E This proves that the intersection of P and S is contained in C Note that OE is the axis of the circle Now consider a point D of the circle C Since C lies in P so does D On the other hand the triangles AOE and DOE are right triangles with a common side OE and legs EA and ED equal Therefore the hypotenuses AO and DO are equal and equal to the radius of S so that D lies in S This proves that C is contained in the intersection of P and S As a corollary on a sphere there is exactly one circle that can be drawn through three given points The proof can be extended to show that the points on a circle are all a common angular distance from one of its poles Compare also conic sections which can produce ovals Two spheres To show that a non trivial intersection of two spheres is a circle assume without loss of generality that one sphere with radius R displaystyle R is centered at the origin Points on this sphere satisfy x2 y2 z2 R2 displaystyle x 2 y 2 z 2 R 2 Also without loss of generality assume that the second sphere with radius r displaystyle r is centered at a point on the positive x axis at distance a displaystyle a from the origin Its points satisfy x a 2 y2 z2 r2 displaystyle x a 2 y 2 z 2 r 2 The intersection of the spheres is the set of points satisfying both equations Subtracting the equations gives x a 2 x2 r2 R2a2 2ax r2 R2x a2 R2 r22a displaystyle begin aligned x a 2 x 2 amp r 2 R 2 a 2 2ax amp r 2 R 2 x amp frac a 2 R 2 r 2 2a end aligned In the singular case a 0 displaystyle a 0 the spheres are concentric There are two possibilities if R r displaystyle R r the spheres coincide and the intersection is the entire sphere if R r displaystyle R not r the spheres are disjoint and the intersection is empty When a is nonzero the intersection lies in a vertical plane with this x coordinate which may intersect both of the spheres be tangent to both spheres or external to both spheres The result follows from the previous proof for sphere plane intersections See alsoLine plane intersection Line sphere intersection Line cylinder intersection Analytic geometry Intersections Computational geometry Equation of a line Intersection set theory Intersection theoryNotesErich Hartmann Geometry and Algorithms for COMPUTER AIDED DESIGN Lecture notes Technische Universitat Darmstadt October 2003 p 17 Erich Hartmann Geometry and Algorithms for COMPUTER AIDED DESIGN Lecture notes Technische Universitat Darmstadt October 2003 p 33 Erich Hartmann CDKG Computerunterstutzte Darstellende und Konstruktive Geometrie Lecture notes TU Darmstadt 1997 p 79 PDF 3 4 MB Erich Hartmann Geometry and Algorithms for COMPUTER AIDED DESIGN Lecture notes Technische Universitat Darmstadt October 2003 p 93 Proof follows Hobbs Prop 304 Hobbs Prop 308 Hobbs Prop 310ReferencesHobbs C A 1921 Solid Geometry G H Kent pp 397 ff Further readingHaines Eric June 6 2021 Intersections Ray Tracing Resources Page Real Time Rendering Retrieved December 14 2023 a grid of intersection routines for various popular objects pointing to resources in books and on the web Nicholas M Patrikalakis and Takashi Maekawa Shape Interrogation for Computer Aided Design and Manufacturing Springer 2002 ISBN 3540424547 9783540424543 pp 408 1 Sykes M Comstock C E 1922 Solid Geometry Rand McNally pp 81 ff