Title: | Mathematics at DEC |
Moderator: | RUSURE::EDP |
Created: | Mon Feb 03 1986 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2083 |
Total number of notes: | 14613 |
I have a small mathematical problem that I need an answer for a customer project and I hope that someone in here can solve it for me. The problem is this: Given: The locations of two points on an x-y coordinate plane and an angle in degrees (0-180) and using the two points as the radius to a circle. What is the x-y coordinate of the point on the circle at the indicated angle? ? \ \ \ \ A \ *--------------* P1 P2 Where: 'P1' and 'P2' are the two points and 'A' is the Angle in degrees. I really appreciate this. I have looked in this conference and couldn't find an answer and this problem is not my strong suit. Thanks again, Mark
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
917.1 | Here's a start | POOL::HALLYB | The smart money was on Goliath | Fri Aug 12 1988 12:49 | 30 |
There are 2 possible answers, depending on whether or not you consider angle A to be "positive" or "negative"; 4 possible ones if you want to consider P1 to the right of P2 as well as the left: ? P1 P2 \ *-----------* \ / \ A / \ / A \ / *--------------* ? P1 P2 Suppose the coordinates are P1 = (x1,y1), P2 = (x2,y2), ? = (x3,y3) Let R = SQRT[ (x2 - x1)� + (y2 - y1)� ] and THETA = A / 2pi Compute x0 = R * COS(THETA) and y0 = R * SIN(THETA) The answer will be one of the four possibilities: (x2 � x0, y2 � y0) To decide whether or not to add or subtract x0 and y0, you need to look at what you want. If, as you show, you want P1 to the left of P2 and "?" above P2, then use (x2 - x0, y2 + y0). John | |||||
917.2 | the center of the circle | LISP::DERAMO | Daniel V. {AITG,LISP,ZFC}:: D'Eramo | Fri Aug 12 1988 18:27 | 5 |
It wasn't clear to me from .0 where the center of the circle was supposed to be. I asked the author by mail, and he said P1, as used in .1. Dan |