# How to find the intersection of a line and a plane with interpolation ( given two points in the opposite side of the plane)

I have two points in the opposite side of a plane (P1,P2) in 3D space, and i know their signed distances to the plane(D1,D2). how can i use interpolation to calculate the point that is the intersection of the line of P1P2 and the plane.

thanks

• Based on the two distances you create an equation of that point - ratios based on the relative distances. Now you have three equation and three unknowns. Solve the system to get the (x, y, z) of the intersection point. – Moti Oct 30 '15 at 16:41
• I could help you, but only without interpolation. Do you want that answer? – Ruts Oct 30 '15 at 16:48
• This may help: en.wikipedia.org/wiki/Line%E2%80%93plane_intersection – NoChance Oct 30 '15 at 16:48
• @Moti what do you mean by equation of the point ? – Nimakhin Oct 30 '15 at 16:49
• @Ruts is it replacing the line equation in the plane ? – Nimakhin Oct 30 '15 at 16:50

## 1 Answer

The values of the points $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$. Let assume ratio of distance from point 1, $d_1$ and point 2, $d_2$ is r. Than for each dimension $P(: x, y, z)$ you calculate the target point value: $P_0 = (P_1-P_2) \times r$ (meaning $P$ takes the values of $x, y, z$)

• i used your formula for 2D ( y=x and two points of (1,-1) , (-1,1) ) and it did not give the (0,0) point ( point of intersection ) – Nimakhin Oct 30 '15 at 18:58
• May be I was not careful enough in explaining it. You calculate r as ratio of d1/(d1+d2) and than you add the appropriate fraction to dimension with appropriate distance For your case the ratio is 0.5. The dimensional difference is 2. Half of it is 1. Of course you need to take into account the direction of the move. and -1 + 1 (or 1 + -1) gives you the (0,0) – Moti Oct 30 '15 at 20:56
• If you will do some investigation of the concept you will get the simplified form for each dimension: $r=\frac {x_1-x_0}{x_0-x_2}$ where r the ratio of distances. Now you calculate $x_0$ – Moti Oct 30 '15 at 21:03