Line of intersection between two planes

后端 未结 6 1528
有刺的猬
有刺的猬 2020-12-01 07:12

How can I find the line of intersection between two planes?

I know the mathematics idea, and I did the cross product between the the planes normal vectors

b

6条回答
  •  一个人的身影
    2020-12-01 07:34

    This method avoids division by zero as long as the two planes are not parallel.

    If these are the planes:

    A1*x + B1*y + C1*z + D1 = 0
    A2*x + B2*y + C2*z + D2 = 0
    

    1) Find a vector parallel to the line of intersection. This is also the normal of a 3rd plane which is perpendicular to the other two planes:

    (A3,B3,C3) = (A1,B1,C1) cross (A2,B2,C2)
    

    2) Form a system of 3 equations. These describe 3 planes which intersect at a point:

    A1*x1 + B1*y1 + C1*z1 + D1 = 0
    A2*x1 + B2*y1 + C2*z1 + D2 = 0
    A3*x1 + B3*y1 + C3*z1 = 0
    

    3) Solve them to find x1,y1,z1. This is a point on the line of intersection.

    4) The parametric equations of the line of intersection are:

    x = x1 + A3 * t
    y = y1 + B3 * t
    z = z1 + C3 * t
    

提交回复
热议问题