I am trying to calculate the point of intersection between a line and plane in 3D

My plane is currently defined by three points (P1, P2, P3). I used the cross product method to define the plane in c++. I have a line intersecting this plane and I need to find the point of intersection the line and plane. How would I carry this out.

http://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection

This is a link to give on an idea of what am doing. I currently trying to program this in C++.

• This seems to be the same question as math.stackexchange.com/questions/47594/… and math.stackexchange.com/questions/83990/…. Also see mathworld.wolfram.com/Line-PlaneIntersection.html. Commented Sep 9, 2014 at 16:51
• Hey David I had a question in the link you sent me, mathworld.wolfram.com/Line-PlaneIntersection.html , I have to divide the two 4 by 4 matrices in order to get t. what is the first row of the matrix (1 , 1 , 1 , 1) and (1 , 1 , 1 , 0).
– user174829
Commented Sep 9, 2014 at 18:19
• Actually you need to divide the determinant of one matrix by the determinant of the other. Very convenient for mathematicians and users of MATLAB, not necessarily so convenient for C++ programmers. You either need to find a good linear algebra library or write your own determinant function. I don't know any particularly intuitive visualization for why there is an extra row of 1s (and a 0) in the matrices, but I do know that if you accurately compute the determinant using those values, you'll be performing the desired computation. Commented Sep 9, 2014 at 19:02