Math Question: Trig, triangles. :-)

Discussion in 'Community Discussion' started by detz, Aug 27, 2008.

  1. detz macrumors 65816

    Joined:
    Jun 29, 2007
    #1
    OK, I have a circle and there is a point in the center. Given two locations on the circle I need to find the angle that is formed in the center. I know this can be done but I'm having trouble making this into an algorithm for a program...here is a diagram to help make my point.

    The first point is the green one, now if the second point is any one of those purple points how can I find the new angle for the center?
     

    Attached Files:

    • trig.jpg
      trig.jpg
      File size:
      580.3 KB
      Views:
      108
  2. Berlepsch macrumors 6502

    Berlepsch

    Joined:
    Oct 22, 2007
    #2
    The answer depends on the coordinate system you are using.
    If you are using cartesians, you can shift your circle so that its center is at the origin. Then you can get the angles from the x-axis to each point through simple trigonometry. Add the results, and you have the angle you are looking for.
     

Share This Page