I am looking to find the distance of a line from a point that is normal to a plane. The unit vector of the plane is known, but it does not pass the origin of the coordinate system, and I do not have its scalar equation. Please see attached image.

The coordinates of two points are known, one has a length (L from P1) to the plane along the normal vector, which is also known. I would like the solve for the length (L` from P2 )of the normal vector on the other point (or the coordinates on the plane at the intersection) using the known length(L). Both are normal to the plane.

By using similar triangles I can solve it in 2D by using the unit vector and the distance between the points. See second part of diagram. However, I am somewhat uncertain of how to do it in 3D since the components of the unit vector would have to be accounted for when using the Lengths (L).

I sure there is an easy to solution to this, but I can not seem to get my head around it.

3D vector problem

  • $\begingroup$ What exactly are the "knowns" here, it's a little ambiguous. From what I can gather, you know a vector orthogonal to the plane in 3D, the coordinates for $P_1$ and $P_2$, and the distance that $P_1$ is away from the plane, correct? Do you also know that $P_1$ and $P_2$ are both on the same side of the plane? $\endgroup$ – Jacob R Jul 25 '19 at 2:22
  • $\begingroup$ Hi Jacob. Sorry that wasn't clear. You are correct, P1 P2 are known as well as a vector, and the length of P1 to the plane. I can confirm that they are also always on the same side of the plane. $\endgroup$ – rbschris Jul 25 '19 at 2:24
  • $\begingroup$ You need to know on which side of the plane relative to the direction of the normal the two points lie. $\endgroup$ – amd Jul 25 '19 at 3:24

Since the plane is not at the origin, it'll be much easier to shift everything over, and start from there.

I am assuming here that $P_1$, $P_2$, and the normal vector are all on the same side of the plane.

First, since we know a normal vector to the plane (let's assume that it's magnitude is 1, and call it $n$) and the distance $P_1$ is from the plane, we can easily find the coordinates for the point $P_1$ projected onto the plane with $P_1 - Ln$.

Now, we have a point on the plane, and a normal vector for the plane. The easiest thing to do now is to shift the projected point to the origin, so we get that $P_1$ becomes $P'_1 = Ln$, and $P_2$ becomes $P'_2 = P_2 - P_1 + Ln$. Now comes the fun part. Since we know that $n$ is still the normal vector for the plane, and we know that $P'_2$ is the coordinate from the origin (which is also the point which $P_1$ was projected to), we can find the distance $P'_2$ is from the plane by simply taking its dot product with the normal vector, so the final computation is:

$$ n \cdot P'_2 = n \cdot P_2 - n \cdot P_1 + L(n \cdot n) = n \cdot P_2 - n \cdot P_1 + L$$

Which is how far $P_2$ is from the plane.

  • $\begingroup$ OkayThanks! I think I see what you are showing. Just to clarify: the point shifting places the point P1' to the origin; the points P1 P2 will now be above the plane on the z axis?(they were shown at z=0) $\endgroup$ – rbschris Jul 25 '19 at 2:50
  • $\begingroup$ The fact that $z = 0$ originally doesn't really change much. In general, if you have the normal vector to a plane centered at the origin, and you want to find the distance that a point is from plane, all you have to do is take the vector form of the point, and take its dot product with the normal vector. That value is the distance to the plane. $\endgroup$ – Jacob R Jul 25 '19 at 3:01
  • $\begingroup$ Also, I'm pretty sure that this is right, I went over the work $\endgroup$ – Jacob R Jul 25 '19 at 3:02
  • $\begingroup$ Thank you very much Jacob. $\endgroup$ – rbschris Jul 25 '19 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.