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

In summary, the conversation discusses the implementation of the Gilbert-Johnson-Keerthi distance algorithm and the difficulty with the general math involved. The process for finding the projection of a point onto a plane is explained using vectors and cross products. The difficulty arises when trying to project a point onto a line, as there are an infinite number of perpendicular vectors. The conversation also mentions using a single data structure to represent both points and vectors in 3-space. The process for finding the projection of a point onto a line is then explained, using linear interpolation and dot products. The conversation concludes by mentioning a simpler method for finding the projection of a point on a line, by determining the plane perpendicular to the line and finding its intersection with the
  • #1
Tynged
2
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.
 
Mathematics news on Phys.org
  • #2
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.
 
  • #3
Assuming you mean orthogonal projection, the simplest way to find the projection of point [itex]P= (x_0, y_0, z_0)[/itex] on line l given by parametric equations [itex]x= at+ b[/itex], [itex]y= ct+ d[/itex], [itex]z= et+ f[/itex], 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.
 

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

What is the concept of projection of a point onto a line in 3-space?

The projection of a point onto a line in 3-space is a method used to find the closest point on a given line to a given point in three-dimensional space. It involves finding the perpendicular distance from the point to the line and then finding the point on the line that is closest to the given point.

How is the projection of a point onto a line in 3-space calculated?

The projection of a point onto a line in 3-space is calculated using vector projection. This involves finding the dot product between the vector from the given point to a point on the line and the direction vector of the line. The resulting scalar is then multiplied by the direction vector and added to the given point to find the projection point.

What is the purpose of projecting a point onto a line in 3-space?

The purpose of projecting a point onto a line in 3-space is to simplify geometric problems and calculations. It allows for the representation of a point in three-dimensional space as a single point on a line, making it easier to work with and manipulate.

Can the projection of a point onto a line in 3-space be negative?

Yes, the projection of a point onto a line in 3-space can be negative. This occurs when the closest point on the line to the given point is located in the opposite direction of the direction vector of the line.

Are there real-world applications of projecting a point onto a line in 3-space?

Yes, the projection of a point onto a line in 3-space has many real-world applications, including in engineering, physics, and computer graphics. It is commonly used in the construction of 3D models and simulations, as well as in calculations for structures and systems in physical and mathematical sciences.

Similar threads

Replies
2
Views
2K
Replies
20
Views
1K
Replies
1
Views
1K
Replies
12
Views
1K
Replies
7
Views
3K
Replies
2
Views
972
Replies
23
Views
2K
Back
Top