?
Solved

angle in a circle

Posted on 2007-10-13
5
Medium Priority
?
797 Views
Last Modified: 2013-12-26
 markww    Member since: 4/5/2007
 
 Posted - 10/13/2007 2:19:29 PM
Hi,

I have a circle, I know its radius. I have a point on its edge. Is there anyway to figure out what angle in degrees that is?


                |
        ------|----
      /         |        \    
     P         |         \  
     |          |           |
 ----------O-------X--------          
     |          |           |
      \         |         /
       \------|---- /
                |
           |

yeah that's a fine ascii circle, so anyway, I'm interested in the angle formed between P, O, X. I know the coordinates of all 3, I just want to know the angle between them.

Thanks for any help

p.s. - the formatting keeps messing up the circle (not that it was that great to begin with, hope it's understandable)
0
Comment
Question by:DJ_AM_Juicebox
  • 3
5 Comments
 
LVL 22

Accepted Solution

by:
NovaDenizen earned 2000 total points
ID: 20071925
atan2(py,px) returns the angle from x counterclockwise in radians.  To convert to degrees, multiply the answer by 180/pi.  If you need the answer to always be positive (range 0 to 360 instead of -180 to 180) then add 360 when the value is negative.
0
 
LVL 85

Expert Comment

by:ozo
ID: 20072456
in  general arccos( (X-O) dot (P-O) / (|X-O| * |P-O|) )
0
 

Expert Comment

by:trgarcia
ID: 20072713
Use your cordinates to determine the length of the intercepted arc between p and x. The angle in radians = the length of the arc / the length of the radius.  The formula found in my Trig book is omega = s / r.  Then convert radians to degrees with 2 pi radians = 360 degree (circumference of a circle).

I don't remember and not able to quickly find how to get the length of the arc segement.  Will let you know if I find out.  Please give details of the coordinates and other information you have about this problem.
0
 
LVL 85

Expert Comment

by:ozo
ID: 20072950
You can find the arc from the cosine of the dot product
0
 
LVL 85

Expert Comment

by:ozo
ID: 20072955
http://en.wikipedia.org/wiki/Dot_product#Geometric_interpretation
If you already know |a| = |b| = radius then you only need a · b
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to re…
How to Win a Jar of Candy Corn: A Scientific Approach! I love mathematics. If you love mathematics also, you may enjoy this tip on how to use math to win your own jar of candy corn and to impress your friends. As I said, I love math, but I gu…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question