Need help with a coordinate equation

1. Jan 6, 2009

chuyler1

See the attached image first. Given that I know points P1 and P2, what would the equation be to get point P3, given that the angle is 90 degrees and the distance from P2 to P3 is 1/5 the distance from P1 to P2?

File size:
798 bytes
Views:
46
2. Jan 6, 2009

tiny-tim

Welcome to PF!

Hi chuyler1! Welcome to PF!

Show us what you've tried, and where you're stuck, and then we'll know how to help.

3. Jan 6, 2009

chuyler1

I haven't a clue where to begin. It's been 8 years since the last time I had to think about calculus. I found some equations on how to rotate a point by 90 degrees but the only examples are to rotate around (0,0).

This calculation has to be performed hundreds of times in a short amount of time so if the equation is too complex i may just fudge it by increasing point P2's y by L/5. It simplifies the problem but doesn't provide desirable results in all situations.

4. Jan 6, 2009

Redbelly98

Staff Emeritus
Could you use the fact that the slopes of perpendicular lines are negative reciprocals of each other? I.e.:

m1 = -1/m2

5. Jan 7, 2009

chuyler1

What is m1 and m2 in your equation?

6. Jan 7, 2009

Redbelly98

Staff Emeritus
They are the slopes of the two lines you drew.

m1 = slope of line P1-P2
m2 = slope of line P2-P3

7. Jan 7, 2009

robphy

No calculus is needed here... just vector algebra.
(Will P1-P2 ever be vertical?)
Are you willing to use trig-functions?

8. Jan 7, 2009

chuyler1

Yes, P1 and P2 are arbitrary, they could be any angle or even reversed. I have trig functions available to me so a solution involving them isn't a problem.

9. Jan 7, 2009

Redbelly98

Staff Emeritus

In the figure, note that we form two similar right triangles, with a scale factor of 1:5.

To get the x-coordinate of P3, subtract (y2-y1)/5 from x2.
To get the y-coordinate of P3, add (x2-x1)/5 to y2.

10. Jan 7, 2009

chuyler1

Awesome! Works perfectly!