Developers Web home

How to calculate the length of a vector at the point of intersection with a plane

Calculate the length of a vector, from the origin to the intersection with a plane.

We require:

  • a point P on the plane
  • the normal n of the plane
  • the intersecting vector v from the origin

We will now calculate d, which is the length of vector v needed for it to intersect the plane.

d = ( nx × Px ) + ( ny × Py ) + ( nz × Pz )
( nx × vx ) + ( ny × vy ) + ( nz × vz )

If the vector v was a unit vector (of length 1) then the length d is in units.

If the vector v was not a unit vector, then:

  • if 0<d<1 then the vector intersects the plane within its length
  • if d>1 then the vector intersects the plane after its length
  • if d<0 then the vector intersects the plane before the origin
  • if d=1 then the vector intersects the plane at the end of the vector
Conversation You must be logged in to add to the conversation
2008-10-16 10:58:21
Me

sdvd dfb dfbdfb dfb

d fb

 dfb dfb

2008-10-16 10:58:37
Me
drgb ergb ’sergb egbr ’esrgbe
2008-10-16 10:58:56
Me
2008-10-16 10:59:26
Me
2008-10-16 11:09:44
Me
2008-10-16 11:11:05
Me