Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
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).
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)
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
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.