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.
Printable View
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.
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)²)
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.
Ah, good plan.
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).