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 :
Two line segments
For two non-parallel line segments and there is not necessarily an intersection point, 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 parametrs are the solution of the linear system It can be solved for s and t using Cramer's rule. 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.
one solves the line equation for or and substitutes it into the equation of the circle and gets for the solution 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: The intersection of two disks forms a shape called a lens.
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 one implicitly and the other parametrically given a 1-dimensional Newton iteration is necessary. See next section.
Two smooth curves
Two curves in , which are continuously differentiable, have an intersection point, if they have a point of the plane in common and have at this point If both the curves have a point and the tangent line there in common but do not cross each other, they are just touching at point. 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:
If both curves are explicitly given:, equating them yields the equation
If both curves are parametrically given:
If one curve is parametrically and the other implicitly given:
If both curves are implicitly given:
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 or 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:
Two polygons
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. 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 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 between curves and surfaces. In the following sections we consider transversal intersection only.
A line and a plane
The intersection of a line and a planein 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.
A curve and a surface
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 curve and
Example: 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 the intersection line of two non-parallel planes.