Results 1 to 5 of 5

Thread: Calculate an arc

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    Mexico City
    Posts
    242

    Calculate an arc

    Hi,

    How do I calculate the length of a section of a circle which is cut by another circle? I know both circles radius, and the offset from their centers.

    Any help is appreciated.
    Live your own life, for you will die your own death.

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    You can use the equation of a circle (like the equation of a striaght line but for circles) to find the crossover points, then use Pythagoras' theorem to figure out the distance between the points:

    eqn of a circle with radius r and center (a, b):

    (x-a)² + (y-b)² = r²

    Every (x, y) pair that satisfies this equation is a point on the circle.


    So label your two circles like this:

    circle 1: radius r, center (a, b)
    (x-a)² + (y-b)² = r²

    circle 2: radius R, center (A, B)
    (x-A)² + (y-B)² = R²


    Now the points at which the circles intersect are the points at which the x and y coordinates satisfy both these equations. So solve them for x and y. There will be two solutions.

    Now you should have two pairs of coordinates, (x1, y1) and (x2, y2).

    To find the distance between them just use Pythag, so the distance d is:

    d² = (x1 - x2)² + (y1 - y2)²
    d = sqr((x1 - x2)² + (y1 - y2)²)
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    There might be an easier method using some geometric theorems and some analysis. Off hand I cannot think of anything.

    The solution by HarryW can be simplified.

    First, you can assume that one circle is at the origin, resulting in the following equation.

    x^2 + y^2 = r^2

    You can assume that the other circle is on the X-Axis, resulting in the following equation.

    (x - Offset)^2 + y^2 = R^2

    If you subtract the first equation from the second, there are no terms involving y, and the x^2 term is eliminated. You now have a linear equation in one variable, allowing you to determine a value for x.

    Substituting the known value for x in the first equation will give you two values for y. They will be equal in absolute value and opposite in sign. From here it should be easy.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Ah, good plan.
    Harry.

    "From one thing, know ten thousand things."

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    Mexico City
    Posts
    242
    Thanks guys. Although I finally realized that the program I'm using can solve the problem for me (duh!), your input is really appreciated. It clarifies things up (I had no idea on where to start before).
    Live your own life, for you will die your own death.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width