|
-
Oct 15th, 2001, 05:36 PM
#1
Thread Starter
Addicted Member
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.
-
Oct 15th, 2001, 07:27 PM
#2
Frenzied Member
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."
-
Oct 15th, 2001, 08:13 PM
#3
Frenzied Member
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.
-
Oct 15th, 2001, 08:19 PM
#4
Frenzied Member
Harry.
"From one thing, know ten thousand things."
-
Oct 15th, 2001, 10:19 PM
#5
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|