**0**

# Projection from point to line

###
#3
Members - Reputation: **115**

Posted 15 December 2012 - 01:40 PM

Assuming Line.direction has length 1, the answer is Line.pos + Line.direction * dot_product(direction, Point - Line.pos).

thank you for replying

Is it Line.pos + Line.direction * dot_product(

**Line**.direction, Point - Line.pos)

I know what is dot product, cross product, knowledge of trigonometry etc but I find it confusing to

apply in problems ( in way of programming ie construction functions to calculate) like:

1) Given a point and a line to find out whether it is on the left or the right side of the line

2) Find angle between a line and a plane

... etc

Is there any tutorials or any weblinks where I can find these sort of problem for practise/learn.

Any guidance or suggestion is welcome

###
#4
Crossbones+ - Reputation: **13897**

Posted 15 December 2012 - 02:04 PM

Assuming Line.direction has length 1, the answer is Line.pos + Line.direction * dot_product(direction, Point - Line.pos).

thank you for replying

Is it Line.pos + Line.direction * dot_product(Line.direction, Point - Line.pos)

Yes, that's what I mean. Sorry about the typo.

There are several ways to think about it. Imagine the plane is the x-y plane inside a 3D space and compute the z component of cross_product(Line.direction, Point - Line.pos).I know what is dot product, cross product, knowledge of trigonometry etc but I find it confusing to

apply in problems ( in way of programming ie construction functions to calculate) like:

1) Given a point and a line to find out whether it is on the left or the right side of the line

An angle is defined between two vectors, and then it's acos(dot_product(v,w)). To compute the angle between a line and a plane, project the line onto the plane and compute the angle between the original line and the projected line.2) Find angle between a line and a plane

... etc

Is there any tutorials or any weblinks where I can find these sort of problem for practise/learn.

Any guidance or suggestion is welcome

I learned Linear Algebra in college. This is something that takes effort to push into your brain, but it's extremely useful, so you should definitely put the effort in. Perhaps Khan Academy has good material on this?