   Finding where a plane and a line intersect
  How do I find the point where a line and a plane intersect.Assume that ax+by+cz+d=0 (the standard form for a plane)And I have two points (e,f,g) and (h,i,j).Is there a formula to figure out the point of intersection?For those who are wondering, I''m trying to build my own 3D engine at the moment, so this is basically a major part of it.Thanks. 
  Pretty easy, equation of a plane : ax+by+cz+d=0 or N.(P-P0) = 0equation of a line : P(t) = Q + tV sub eq of a line into the eq for a planeN.(Q + tV -P0) = 0solve for tt = (N.P0 - N.Q)/N.Vsub t back into the equation of a line, and you have the point of intersection.Hope that helps ;  I''m not that far up the math ladder, so help me out a little here.  I''m assuming in the line equation, Q and V are two points and t is the slope?But I''m sorta confused on the plane equation.  What does N.(P-PO) mean?And example would be great if you could do one. ;  Q is the ''origin'' of the line (e,f,g)V is the direction of the line (h,i,j) - (e,f,g) t is a number ranging from 0 to 1 (you can think of it as time)so at t = 1P(1) = (e,f,g) + (h,i,j) - (e,f,g) = (h,i,j)at t = 0P(0) = (e,f,g)The values inbetween are points on the line connecting (e,f,g) and (h,i,j)N.(P-PO) = 0 is another way of writing  ax+by+cz+d=0N.P - N.P0 = 0 or Nx*Px + Ny*Py + Nz*Pz - N.P0 = 0which can be written as x*a + y*b + z*c + d = 0;  Terminology: That was the parametric   equation of a line. ;  Ok, im understanding how to do it in general.  But I''m not really understanding the N.(P-P0) = 0 part.  Or really just what the . (dot) means and the N, P, and P0.So if possible, could you expand both the t = (N.P0 - N.Q)/N.V formula and N.(P-P0) = 0formula.  What I''m really confused about it the P0 part.  Is that the origin of the line at P(0) or something completely different?Thanks again. ;  I''m not sure this is it, but:t = (A*x1+B*y1+C*z1+D) / (A*(x1-x2)+B*(y1-y2)+C*(z1-z2))Is this it? ;  N.(P-P0) = 0the . means the dot product.  P0 and P are two points that lie on the plane, and N is the normal vector of the plane.  To understand the equation you really need to understand the dot product (im sure google can help you with that).The most important thing to know is that the dot product of two perpendicular vectors is 0.  Since P and P0 are two points on the plane, P-P0 is a vector that is perpendicular to the planes normal vector N.  And since the dot product of 2 perpendicular vectors is 0, we can writeN.(P-P0) = 0The dot product can also be written in terms of the components of the vector asA.B = Ax*Bx + Ay*By + Az*BzAnd so you can evaluate N.(P-P0) = 0to be  Nx*Px + Ny*Py + Nz*Pz - N.P0 = 0-N.P0 is a constant(P0 is always going to be a point on the plane and the normal vector is always going to be the same), and so it is sometimes just written as the letter D.So Nx*Px + Ny*Py + Nz*Pz - N.P0 = 0becomes Nx*Px + Ny*Py + Nz*Pz + D = 0 with D = -N.P0Now, applying that to t = (N.P0 - N.Q)/N.V we gett = -1* (Nx*e + Ny*f + Nz*g + D)/(Nx*(h-e) + Ny*(i-f) + Nz*(j-g)) (here i took a minus one out of (N.P0 - N.Q) to make it -(N.Q -N.P0), or -(N.Q + D), and then evaluated the dot product N.Q)if you then multiply the denominator by the -1, you get t = (Nx*e + Ny*f + Nz*g + D)/(Nx*(e-h) + Ny*(f-i) + Nz*(g-j))Hope that clears it up ;  Yup, thanks a lot. 