You are not logged in.
Hi Folks,
I'm trying to get a method to get a 2d point coordinates at given perpendicular distance to a known 2D point in a line like the figure showed.
Thanks in advance
Nicolas Zaragoza
Offline
You're given the direction vector for line L, and you're also told that the line from P1 to P is perpendicular to L and so that means that you can work out the direction vector from P1 to P.
If v = ai + bj, where i and j are perpendicular unit vectors in the plane, then the direction vector from P1 to P is given by (-b)i + aj.
That just tells you the direction. To make it the correct length, you first scale it to be a unit vector by dividing by its magnitude, then you multiply by the given d.
After you find P1-->P, you can use that along with the position vector P1 to calculate the position vector P.
Hopefully I've explained it well enough for you to understand what I mean. Feel free to post again if I've just confused you even more.
Why did the vector cross the road?
It wanted to be normal.
Offline
I'll call the slope of the known line V.
The P1 point I'll coordinate as (XP1,YP1).
Then, I get this for P.
(XP,YP) = ( XP1 - (Vd/(V^2 + 1)^0.5) , YP1 + (d/(V^2 +1)^0.5))
igloo myrtilles fourmis
Offline
Thank you very much to all of you..... it'was very helpful to me. I'm wondered the fast you respond to me!!!
Offline