TOPICS
Search

Line-Line Intersection


LineLineIntersection

The intersection of two lines L_1 and L_2 in two dimensions with, L_1 containing the points (x_1,y_1) and (x_2,y_2), and L_2 containing the points (x_3,y_3) and (x_4,y_4), is given by

where [画像:|a b; c d|] denotes a determinant. This corresponds to simultaneously solving

for x and y. Other treatments are given by Antonio (1992) and Hill (1994).

The intersections of two lines given in trilinear coordinates as

l_1alpha+m_1beta+n_1gamma =
(5)
l_2alpha+m_2beta+n_2gamma =
(6)

is

Pseudocode for segment intersection is given by de Berg et al. (2000).

Three lines in trilinear coordinates

l_1alpha+m_1beta+n_1gamma =
(8)
l_2alpha+m_2beta+n_2gamma =
(9)
l_3alpha+m_3beta+n_3gamma =
(10)

concur if their trilinear coordinates satisfy

in which case the point is

m_2n_3-n_2m_3:n_2l_3-l_2n_3:l_2m_3-m_2l_3.
(12)

Three lines in Cartesian coordinates concur if the coefficients of the lines

A_1x+B_1y+C_1 =
(13)
A_2x+B_2y+C_2 =
(14)
A_3x+B_3y+C_3 =
(15)

satisfy

In three dimensions, the algebra becomes more complicated. The intersection of two lines containing the points x_1=(x_1,y_1,z_1) and x_2=(x_2,y_2,z_2), and x_3=(x_3,y_3,z_3) and x_4=(x_4,y_4,z_4), respectively, can also be found directly by simultaneously solving

x = x_1+(x_2-x_1)s
(17)
x = x_3+(x_4-x_3)t
(18)

together with the condition that the four points be coplanar (i.e., the lines are not skew),

for x=(x,y,z), eliminating s and t. This set of equations can be solved for s to yield

where

a = x_2-x_1
(21)
b = x_4-x_3
(22)
c = x_3-x_1
(23)

(Hill 1994).

The point of intersection can then be immediately found by plugging back in for s to obtain

A slightly more symmetrical and concise form can obtained by additionally defining

v = a^^xb^^
(25)

where x^^ denotes a unit vector, then

x=1/2(x_1+a^^s_1+x_3+b^^s_2)
(28)

(Goldman 1990).


See also

Concur, Concurrent, Intersection, Line, Line-Line Angle, Line-Line Distance, Line-Plane Intersection, Proclus' Axiom, Skew Lines

Explore with Wolfram|Alpha

WolframAlpha

References

Antonio, F. "Faster Line Segment Intersection. Ch. IV.6 in Graphics Gems III (Ed. D. Kirk). San Diego: Academic Press, pp. 199-202 and 500-501, 1992.Bentley, J. and Ottmann, T. "Algorithms for Reporting and Counting Geometric Intersections." IEEE Trans. Comput. C-28, 643-647, 1979.de Berg, M.; van Kreveld, M.; Overmars, M.; and Schwarzkopf, O. Computational Geometry. New York: Springer, pp. 19-29, 2000.Goldman, R. "Intersection of Two Lines in Three-Space." In Graphics Gems I (Ed. A. S. Glassner). San Diego: Academic Press, p. 304, 1990.Hill, F. S. Jr. "The Pleasures of 'Perp Dot' Products." Ch. II.5 in Graphics Gems IV (Ed. P. S. Heckbert). San Diego: Academic Press, pp. 138-148, 1994.Mehlhorn, K. and Näher, S. "Implementing a Sweep Line Algorithm for the Straight Line Segment Intersection Problem." n.d. http://www.mpi-sb.mpg.de/LEDA/articles/sweep.ps.gz.Prasad, M. "Exact Computation of 2-D Intersections." Ch. IV.4 in Graphics Gems II (Ed. J. Avro). Boston, MA: Academic Press, pp. 7-9, 1991.Prasad, M. "Faster Line Segment Intersection." Ch. IV.6 in Graphics Gems II (Ed. J. Avro). Boston, MA: Academic Press, pp. 7-9, 1991.

Referenced on Wolfram|Alpha

Line-Line Intersection

Cite this as:

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

Subject classifications

AltStyle によって変換されたページ (->オリジナル) /