3D line plane intersection, with simple plane

后端 未结 4 632
走了就别回头了
走了就别回头了 2021-01-14 09:39

i have two points in 3D space which have X-coordinates with different signum. so one of them lies definitely on one side of the X-plane and one on the other.

now i w

4条回答
  •  天涯浪人
    2021-01-14 09:57

    P1 = (x1,y1,z1)
    P2 = (x2,y2,z2)
    
    k1 = -x2/(x1-x2)
    k2 = 1-k1
    
    Intersection = k1*P1 + k2*P2    or:
    Ix = 0              - we know this one
    Iy = k1*y1 + k2*y2
    Iz = k1*z1 + k2*z2
    

    I'm assuming P1 is to the right and P2 to the left. It may work with them reversed.

提交回复
热议问题