Find the point on a line that is X distance away from a plane

In summary, the conversation discusses finding a point on a line that is a certain distance away from a given plane along the plane's normal. The equation D = N dot (B - P) is examined, but it is not possible to reverse the dot product to find the point P. The solution involves finding the point of intersection between the line and the plane, projecting the point onto the plane to find a point T, and using the distance formula to find the distance from C to the plane. This procedure may yield multiple solutions and is not possible if the line is perpendicular to the plane.
  • #1
caibbor
19
0
given:
a plane with normal N and a point on the plane P.
a line from A to B that intersects the plane but is not coplanar.

Find the point C on the line that is X distance away from the plane (along the plane's normal, meaning the shortest line that can be drawn from the point to the plane)

Note: I am not mathematically savvy, I prefer to work visually with vectors, cross products, dot products, etc, such as equations like the distance D of point B to the plane is D = N dot ( B - P ). That makes sense to me, numbers and fancy equations... not so much.
 
Last edited:
Physics news on Phys.org
  • #2
Do you have any thoughts on how to approach this problem? This sounds like a homework problem, so before we can help, you need to tell us how you've worked on this problem.
 
  • #3
It's not homework, it's for a game engine. It's part of an attempt to move a swept sphere relatively close to a plane along the swept sphere's velocity vector without intersecting the plane.

out of the sweep algorithm, I get the origin of the sphere where it will first collide with the plane. Currently I'm just moving it an extra epsilon away from the poly along the direction of the velocity vector, but the less steep the angle of that vector to the plane, the closer that point actually is to the plane. So, you see, I need to move it the same distance away from the plane regardless of the angle of the vector, and the point needs to stay on the velocity vector. (if I don't stay on the vector, I risk colliding with another polygon somewhere. I know that anything before a certain point on that vector is safe, since the poly is the closest thing I have collided with)

I have examined the equation mentioned above to get the distance of a point to a plane, D = N dot (B - P ), where D is the only unknown. I figure that you could re-arrange this equation such that D is a known (the distance we want to set the point at) and make P the unknown, that would work. But I don't believe it is possible to reverse dot product. you can't take a vector, turn it into a scalar, and then back to a vector since it can have many possible answers. It would be something like P = B + ( N revrese_dot ( D ) )

edit: I'm currently reseraching whether "reverse dot product" is a thing. I have found this link: https://www.physicsforums.com/showthread.php?t=668149
 
Last edited:
  • #4
Ok, looking at your first post. Do you want the distance to be along the line, or just the length of the shortest straight line it is possible to draw from the point C to the plane?
 
  • #5
the latter.

the distance of the shortest line drawn from a point to the plane (that is to say, the distance along the plane's normal, not the line) but the point needs to exist on the line.
 
Last edited:
  • #6
Well, it seems first we have to find the point Q of the intersection between the line and the plane. We can then project the point C perpendicularly onto the plane to find a point T. since we know where the intersection is, we can find the distance from C to the intersection point: ||C-Q||. We can also find the distance from the projected point to the intersected point: ||T-Q||. These two lines plus the straight line down from point C to T define a right triangle, and the distance from the point C to the plane is then: D=||C-T||=\sqrt(||C-Q||^2-||T-Q||^2)

So the problem is to find the point Q given A, B, P, and N. And then finding the point T given some arbitrary C that is on the line AB.

I think though that this procedure will not be unique, and will yield potentially two points on the line which both are a distance x away from the plane.

This problem will obviously also have no solutions if the line is perpendicular to the plane (or co-planar).
 
  • #7
Thank you, I'm going to digest this a little bit and get back to you.
 

1. What is the equation for finding the point on a line that is X distance away from a plane?

The equation for finding the point on a line that is X distance away from a plane is called the "distance formula". It is derived from the Pythagorean theorem and is expressed as:
d = |ax + by + cz + d| / √(a² + b² + c²)
Where (a, b, c) is a vector perpendicular to the plane and (x, y, z) is a point on the line.

2. How does the distance formula work?

The distance formula works by finding the shortest distance between a point on the line and a point on the plane. It does this by calculating the perpendicular distance between the two points, which is represented by the numerator in the equation. The denominator represents the magnitude of the vector perpendicular to the plane, which is used to normalize the distance.

3. Can you use the distance formula to find the distance between a line and a plane?

Yes, the distance formula can be used to find the distance between a line and a plane. This is because the distance between a line and a plane is defined as the shortest distance between any point on the line and any point on the plane, which is exactly what the distance formula calculates.

4. What are the inputs for the distance formula?

The inputs for the distance formula are the coefficients of the plane's equation (a, b, c, and d) and the coordinates of a point on the line (x, y, z).

5. Are there any special cases to consider when using the distance formula?

Yes, there are a few special cases to consider when using the distance formula. One is when the line is parallel to the plane, in which case the distance between them is undefined. Another is when the plane is a vertical plane, in which case the distance formula should be modified to account for the absence of a z-coordinate in the plane's equation.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
7
Views
883
  • Precalculus Mathematics Homework Help
Replies
1
Views
701
Replies
10
Views
1K
  • Precalculus Mathematics Homework Help
Replies
8
Views
2K
  • Precalculus Mathematics Homework Help
Replies
17
Views
995
  • General Math
Replies
3
Views
884
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
13
Views
280
Replies
4
Views
966
Back
Top