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

  • Context: Undergrad 
  • Thread starter Thread starter caibbor
  • Start date Start date
  • Tags Tags
    Line Plane Point
Click For Summary

Discussion Overview

The discussion revolves around finding a point on a line that is a specified distance away from a plane, focusing on the geometric and mathematical implications of the problem. Participants explore the relationship between the line, the plane, and the distance along the plane's normal, with applications in game engine development.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant describes the problem setup involving a plane with normal N, a point P on the plane, and a line from A to B that intersects the plane but is not coplanar.
  • Another participant asks for clarification on the approach and suggests that the problem may be homework-related, prompting the original poster to clarify its application in a game engine context.
  • The original poster explains the need to move a swept sphere away from the plane along its velocity vector while avoiding intersection, indicating that the distance must remain consistent regardless of the angle of the vector to the plane.
  • A participant proposes finding the intersection point Q between the line and the plane, then projecting point C perpendicularly onto the plane to find point T, using these points to define a right triangle to calculate the distance to the plane.
  • Concerns are raised about the potential non-uniqueness of the solution, as the procedure may yield two points on the line that are both a distance X away from the plane, and the problem may have no solutions if the line is perpendicular to the plane or coplanar.

Areas of Agreement / Disagreement

Participants express differing views on the uniqueness of the solution and the conditions under which the problem may have no solutions. There is no consensus on a definitive approach or resolution to the problem.

Contextual Notes

The discussion highlights the complexity of the geometric relationships involved, including the dependence on the specific configurations of the line and plane, and the implications of the angle of the velocity vector.

caibbor
Messages
19
Reaction score
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
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.
 
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:
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?
 
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:
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).
 
Thank you, I'm going to digest this a little bit and get back to you.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
470
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K