Projection of a point onto a line in 3-space.

Click For Summary
SUMMARY

This discussion focuses on the mathematical process of projecting a point onto a line in 3-dimensional space, specifically within the context of implementing the Gilbert–Johnson–Keerthi distance algorithm. The user successfully projects points onto planes using vector cross products but seeks clarity on projecting points onto lines defined by two points. The solution involves using linear interpolation to find the intersection point on the line and applying the dot product to ensure orthogonality. The discussion emphasizes the need to establish a plane perpendicular to the line that contains the point to be projected.

PREREQUISITES
  • Understanding of vector mathematics in 3D space
  • Familiarity with linear interpolation techniques
  • Knowledge of dot product and its geometric implications
  • Experience with parametric equations of lines
NEXT STEPS
  • Study the Gilbert–Johnson–Keerthi distance algorithm in detail
  • Learn about orthogonal projections in vector spaces
  • Explore linear algebra concepts related to vector representation
  • Investigate the use of parametric equations in 3D geometry
USEFUL FOR

Mathematicians, computer graphics developers, and anyone involved in 3D modeling or computational geometry who needs to understand point-line projection techniques.

Tynged
Messages
2
Reaction score
0
I am working on an implementation of the Gilbert–Johnson–Keerthi distance algorithm and am having difficulty with some of the more general math involved.

I am able to find the projection of a point onto a plane because I'm given at least three points on the plane and the point that is to be projected. I can form two vectors given the three points on the plane and take the cross product of those two vectors to create a vector orthogonal to both vectors in addition to the plane.

I am unsure how to do this when projecting a point onto a line, however. I know two points on the line and the point that is to be projected. There are an infinite number of vectors perpendicular to this line, but the one that also goes through the given point not on the line should be the vector I'm looking for.

I'd also like to note that I am using a single data structure to represent both points and vectors in 3-space. A structure containing the data {0, 0, 0} could represent a point at the origin or a vector with zero magnitude. A structure containing the data {3,4,0} could represent a point where x=3, y=4, and z=0 or it could represent a vector whose tail is at the origin and whose head is at the point where x=3, y=4, and z=0. In the implementation I am using, vector tails are always placed at the origin, and vector heads are placed at the given x,y,z coordinate. This makes it a little more difficult to think about the problem, for me at least.
 
Physics news on Phys.org
If you have a line AB and a point P, this is a 2D problem (on a plane with an arbitrary orientation in 3D space, of course).

The point of intersection Q is a linear interpolation between the points A and B. So Q = A + s(B-A) for some value of s.

Then you have the dot-product AB . PQ = 0 to find s.
 
Assuming you mean orthogonal projection, the simplest way to find the projection of point P= (x_0, y_0, z_0) on line l given by parametric equations x= at+ b, y= ct+ d, z= et+ f, is to determine to plane perpendicular to l that contains P- that will be, of course, a(x-x_0)+ c(y-y_0)+ e(z- z_0)= 0- and determine where the given line crosses that plane.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 20 ·
Replies
20
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 23 ·
Replies
23
Views
2K