Posted: 8/20/2016 10:07:56 AM EDT
|
I would solve the problem on the right by subtraction using the areas defined by the chord and radii.
Show which part of the overlap you want on the right. You might find a single solution by resorting to analytic geometry and a set of equations that define the circles and how they are located with respect to each other. Not the way to bet. |
|
Are you finding the area of the sector, then subtracting the area of the triangles? This seems the easiest approach to me.
I don't have my copy handy right now, but Machinery's Handbook has formulas for the area of sectors, and finding the area of the triangles is also straight forward---you might need to use a bit of simple trig to get the height by dropping a perpendicular from the center of the circle to the midpoint of the Isosceles base. I'd be inclined to set up something that first calculates the sectors, then calculates the triangle areas, then finds the difference. |
|
Looking for a programmable solution or something that can be manually implemented?
With two unequal circles, you know the upper limit is the area of the smaller circle if it is wholly contained. If not wholly contained, the overlap area is that of the smaller circle minus the external portion. You can readily find the area of the segments defined by the chord of the overlap (the common triangle side). Subtract the area of the larger circle segment from the smaller circle segment & subtract that result from the smaller circle area... Nick |
|
I think this is going to be a calculus problem and not a geometry problem.
It's been a while, but it's something like x^2 + y^2 = Radius, alter the circle down so that one of the axes sits on the intersection points (preferably with one of the points on the origin), then integrate. Multiply times two for full area. ETA: portion in red applies for two circles of same radius. Different radius would require two integrals. |
|
That's a good one. Not sure I could have figured it out myself.
But, my google friend says this is the page you want. area of intersecting circles |
|
Quoted:
I think this is going to be a calculus problem and not a geometry problem. It's been a while, but it's something like x^2 + y^2 = Radius, alter the circle down so that one of the axes sits on the intersection points (preferably with one of the points on the origin), then integrate. Multiply times two for full area. Yeah. Just read through the page I posted and now my head hurts. |
|
Quoted:
It's valuable to know hows and whys. Quoted:
Quoted:
Fuck yeah. What are all these fancy computers and software for? Quoted:
I'd cheat and use CAD ![]() It's valuable to know hows and whys. I definitely agree, and I could figure it out if I stared at it for a bit while scratching my head to remember equations. However there are tools available to make this super easy if you only need a couple of numbers. It does sound like OP wants more than just a couple of numbers though. |
|
Quoted:
That's a good one. Not sure I could have figured it out myself. But, my google friend says this is the page you want. area of intersecting circles Quoted:
That's a good one. Not sure I could have figured it out myself. But, my google friend says this is the page you want. area of intersecting circles Quoted:
http://mathworld.wolfram.com/Circle-CircleIntersection.html So this is one of the solutions that only works for the type of geometry seen on the left (either that, or I coded it wrong)
|
|
Quoted:
So this is one of the solutions that only works for the type of geometry seen on the left (either that, or I coded it wrong) ![]() Quoted:
Quoted:
That's a good one. Not sure I could have figured it out myself. But, my google friend says this is the page you want. area of intersecting circles Quoted:
http://mathworld.wolfram.com/Circle-CircleIntersection.html So this is one of the solutions that only works for the type of geometry seen on the left (either that, or I coded it wrong) ![]() It should work for both but you may find that with the geometry on the right you get suplimental angle values that need to be corrected. I've noticed this when working acute non right triangles as opposed to oblique ones. The formula doesn't work the same for some reason. I think that could be happening when the center of the left circle enters the circumference of the other. And that right there is why it's important to know the hows and whys, folks. If I just plugged the numbers in and accepted the answer without knowing about what it should be or why it is the way it is, I'd have bad info. |
|
I may be confused as to what you are asking for - it seems that you are looking for the area (i.e. square feet, etc) of the overlap for two circles. If you don't know the radii, then you can't calculate any areas since you won't have any starting point.
Your diagrams show the two general cases for overlapping circles, and they solve the same way. To calculate the overlap area you will need to know the radius of each circle and ether the length of the radical line (the line connecting the two points of intersection of the two circles - in this case the solid vertical line in the diagram on the right OR the distance between the centers of the two circles. Trigonometry will allow us to calculate all requirements from there. The overlap consists of two lobes, one on either side of the radical line, and each side is a part of on of the two circles. If the two circles overlap as in the diagram of the left (the centers of the two circles are on opposite sides of the radical line), then each lobe is calculated using the center on the other side of the radical line. If the circles are as in the right diagram, then the lobe opposite the two centers is from the larger circle (this can only happen if the circles are of different sizes) and the other lobe is from the smaller circle. If you know the radical line length, then you can calculate the rest fairly simply. We need to calculate the area of each lobe. For this we need to find the appropriate triangle, and the arc of the circle. We'll use right triangles to give half the area and then multiply by 2 for the whole area. In this case, the right triangle for either side has as its hypotenuse the radius of the appropriate circle, and one leg is half the radical length. We get the base leg by using A^2 +B^2 = C^2, where C is the hypotenuse and A is half the radical. We can then calculate the area of the right triangle as 1/2 A*B, which we now multiply by 2 to cover the other half of the full triangle. The area of the arc is calculated as a fraction of the area of a circle, or (angle of arc/360 degrees) * area of circle. We calculate the angle of the arc using the right triangle above, where sin (triangle) = 0.5 * radical length/radius. The arc is then twice this. Subtracting the area of the triangle from the area of the arc gives us the area of the lobe. In the case of both centers being on the same side of the radical line, the lobe we have found for the smaller circle is the wrong one. The lobe that we want is the REST of the circle, so the area of the lobe would be the area of the whole circle minus the area of the segment we just found. If you don't know the length of the radical, then it can be calculated from the two radii and the distance between the centers, though that requires more math. Mike |
|
Quoted:
I may be confused as to what you are asking for - it seems that you are looking for the area (i.e. square feet, etc) of the overlap for two circles. If you don't know the radii, then you can't calculate any areas since you won't have any starting point. Your diagrams show the two general cases for overlapping circles, and they solve the same way. To calculate the overlap area you will need to know the radius of each circle and ether the length of the radical line (the line connecting the two points of intersection of the two circles - in this case the solid vertical line in the diagram on the right OR the distance between the centers of the two circles. Trigonometry will allow us to calculate all requirements from there. The overlap consists of two lobes, one on either side of the radical line, and each side is a part of on of the two circles. If the two circles overlap as in the diagram of the left (the centers of the two circles are on opposite sides of the radical line), then each lobe is calculated using the center on the other side of the radical line. If the circles are as in the right diagram, then the lobe opposite the two centers is from the larger circle (this can only happen if the circles are of different sizes) and the other lobe is from the smaller circle. If you know the radical line length, then you can calculate the rest fairly simply. We need to calculate the area of each lobe. For this we need to find the appropriate triangle, and the arc of the circle. We'll use right triangles to give half the area and then multiply by 2 for the whole area. In this case, the right triangle for either side has as its hypotenuse the radius of the appropriate circle, and one leg is half the radical length. We get the base leg by using A^2 +B^2 = C^2, where C is the hypotenuse and A is half the radical. We can then calculate the area of the right triangle as 1/2 A*B, which we now multiply by 2 to cover the other half of the full triangle. The area of the arc is calculated as a fraction of the area of a circle, or (angle of arc/360 degrees) * area of circle. We calculate the angle of the arc using the right triangle above, where sin (triangle) = 0.5 * radical length/radius. The arc is then twice this. Subtracting the area of the triangle from the area of the arc gives us the area of the lobe. In the case of both centers being on the same side of the radical line, the lobe we have found for the smaller circle is the wrong one. The lobe that we want is the REST of the circle, so the area of the lobe would be the area of the whole circle minus the area of the segment we just found. If you don't know the length of the radical, then it can be calculated from the two radii and the distance between the centers, though that requires more math. Mike Very good. Don't know why I didn't think of calculating the area of the lobe like that. Area of the triangle and arc section are easy. Calculating the radical is easy. You have the three sides of the triangle (r1, r2, and distance between centers). It's just a matter of working the non-right triangle. I don't keep those formula in my head cause I have them written down.
|
|
Quoted:
Very good. Don't know why I didn't think of calculating the area of the lobe like that. Area of the triangle and arc section are easy. Calculating the radical is easy. You have the three sides of the triangle (r1, r2, and distance between centers). It's just a matter of working the non-right triangle. I don't keep those formula in my head cause I have them written down.
And, now it's my turn to wonder why I didn't think of that - I spent a bunch of time and paper doing calculations and didn't even consider using the single triangle. The angle of each half arc can be calculated using the cosine rule (C^2 = A^2 + B^2 - 2AB Cos C) and then the height of the radical easily done from the radius and angle. Thinking about it, I suspect that I managed to recreate that rule through a twisted and torturous process... Mike |
|
Any reason you can't use calculus? Using triangles only gives you an approximate value. Stuff like this is literally one of the readons why calculus was invented.
Given two circles with general form c and c2, and assuming c is centered on the point of origin (because why complicate things?) , then the area of c-c2 gives you the non-overlapped area for circle 1. A simple intregral will spit that out quickfast. Subtract that from the original area of C, problem solved. |
|
Quoted:
Any reason you can't use calculus? Using triangles only gives you an approximate value. Stuff like this is literally one of the readons why calculus was invented. Given two circles with general form c and c2, and assuming c is centered on the point of origin (because why complicate things?) , then the area of c-c2 gives you the non-overlapped area for circle 1. A simple intregral will spit that out quickfast. Subtract that from the original area of C, problem solved. Using trig doesn't just approximate. You figure the area of the entire circle, divide 360 by the angle of the triangle and that give you that piece of the pie. Subtract the area of the triangle and you have the exact area of the lobe. |
|
The first and only hard part is the to find the length of the radical (that is, the straight line connecting the two points at which the circles intersect). You should choose a x-y coordinate system and describe your circles in those coordinates. In this case, the circle, that is the locus of points forming the perimeter of the circle, are described by two equations
(x-a)^2 + (y-b)^2 = R^2 (x-c)^2 + (y-d)^2 = S^2 Where circle one is centered at (a,b) with radius of R and circle two is centered at (c,d) with radius of S. That is to say, the set of xs and ys that simultaneously satisfy both above equations will be the points of interesection of the two circles. Solve these two equations simultaneously for (x,y). You should get quadratic equations for x and y. If you get two real roots for x and y, then you have a normal intersection. If you get repeated roots, the circles are tangent and there is no intersection area. If you get imaginary roots, the circles don't intersect. The only corner case is the degenerate case of two identical circles, which is not interesting anyway. This algebra is identical for both cases you describe in your figure (i.e., it does not matter if the center of one circle is interior of the other circle). It is best to choose your x-axis (or y-axis, same thing) so that it coincides with the center-to-center line of the two circles. That way, you need only solve for a single x (or y), and the only quadratic is in y (x). After you find the two endpoints of the radical (x1,y1) and (x2,y2), you compute the length of the radical as L = sqrt((x1-x2)^2 + (y1-y2)^2). The intersection area is then just algebra on the areas of the two circular segments and the two triangles. EDIT: This link gives a complete solution to your problem: http://mathworld.wolfram.com/Circle-CircleIntersection.html |
|
Quoted:
Using trig doesn't just approximate. You figure the area of the entire circle, divide 360 by the angle of the triangle and that give you that piece of the pie. Subtract the area of the triangle and you have the exact area of the lobe. Quoted:
Quoted:
Any reason you can't use calculus? Using triangles only gives you an approximate value. Stuff like this is literally one of the readons why calculus was invented. Given two circles with general form c and c2, and assuming c is centered on the point of origin (because why complicate things?) , then the area of c-c2 gives you the non-overlapped area for circle 1. A simple intregral will spit that out quickfast. Subtract that from the original area of C, problem solved. Using trig doesn't just approximate. You figure the area of the entire circle, divide 360 by the angle of the triangle and that give you that piece of the pie. Subtract the area of the triangle and you have the exact area of the lobe. In terms of raw # of calculations, doing trig is going about this the long way. |
|
Quoted:
In terms of raw # of calculations, doing trig is going about this the long way. Quoted:
Quoted:
Quoted:
Any reason you can't use calculus? Using triangles only gives you an approximate value. Stuff like this is literally one of the readons why calculus was invented. Given two circles with general form c and c2, and assuming c is centered on the point of origin (because why complicate things?) , then the area of c-c2 gives you the non-overlapped area for circle 1. A simple intregral will spit that out quickfast. Subtract that from the original area of C, problem solved. Using trig doesn't just approximate. You figure the area of the entire circle, divide 360 by the angle of the triangle and that give you that piece of the pie. Subtract the area of the triangle and you have the exact area of the lobe. In terms of raw # of calculations, doing trig is going about this the long way. It's hardly a simple integral to perform. The difficulty with integration is the same as the in the albegraic solution: defining the boundary enclosing the surface of interest over which you will integrate. By the time you've properly defined the integration contour, you've already solved it without calculus. There are two calculations: a root finding calculation, and a very easy plug and chug area calculation. This is an algebra problem and a trig problem, I think calculus makes it unnecessarily complicated. |
|
Quoted:
The first and only hard part is the to find the length of the radical (that is, the straight line connecting the two points at which the circles intersect). You should choose a x-y coordinate system and describe your circles in those coordinates. In this case, the circle, that is the locus of points forming the perimeter of the circle, are described by two equations (x-a)^2 + (y-b)^2 = R^2 (x-c)^2 + (y-d)^2 = S^2 Where circle one is centered at (a,b) with radius of R and circle two is centered at (c,d) with radius of S. That is to say, the set of xs and ys that simultaneously satisfy both above equations will be the points of interesection of the two circles. Solve these two equations simultaneously for (x,y). You should get quadratic equations for x and y. If you get two real roots for x and y, then you have a normal intersection. If you get repeated roots, the circles are tangent and there is no intersection area. If you get imaginary roots, the circles don't intersect. The only corner case is the degenerate case of two identical circles, which is not interesting anyway. This algebra is identical for both cases you describe in your figure (i.e., it does not matter if the center of one circle is interior of the other circle). It is best to choose your x-axis (or y-axis, same thing) so that it coincides with the center-to-center line of the two circles. That way, you need only solve for a single x (or y), and the only quadratic is in y (x). After you find the two endpoints of the radical (x1,y1) and (x2,y2), you compute the length of the radical as L = sqrt((x1-x2)^2 + (y1-y2)^2). The intersection area is then just algebra on the areas of the two circular segments and the two triangles. EDIT: This link gives a complete solution to your problem: http://mathworld.wolfram.com/Circle-CircleIntersection.html You're making it more complex than it needs to be. We don't care where the circles are. Only their relationship with each other. Finding the radical is one op. Two areas of circles. Two percentages of the area. Two areas of triangles. Two subtraction, one addition. This is five minutes worth of math, tops. All with simple trig and geometry. |
|
Quoted:
It's hardly a simple integral to perform. The difficulty with integration is the same as the in the albegraic solution: defining the boundary enclosing the surface of interest over which you will integrate. By the time you've properly defined the integration contour, you've already solved it without calculus. There are two calculations: a root finding calculation, and a very easy plug and chug area calculation. This is an algebra problem and a trig problem, I think calculus makes it unnecessarily complicated. Quoted:
Quoted:
Quoted:
Quoted:
Any reason you can't use calculus? Using triangles only gives you an approximate value. Stuff like this is literally one of the readons why calculus was invented. Given two circles with general form c and c2, and assuming c is centered on the point of origin (because why complicate things?) , then the area of c-c2 gives you the non-overlapped area for circle 1. A simple intregral will spit that out quickfast. Subtract that from the original area of C, problem solved. Using trig doesn't just approximate. You figure the area of the entire circle, divide 360 by the angle of the triangle and that give you that piece of the pie. Subtract the area of the triangle and you have the exact area of the lobe. In terms of raw # of calculations, doing trig is going about this the long way. It's hardly a simple integral to perform. The difficulty with integration is the same as the in the albegraic solution: defining the boundary enclosing the surface of interest over which you will integrate. By the time you've properly defined the integration contour, you've already solved it without calculus. There are two calculations: a root finding calculation, and a very easy plug and chug area calculation. This is an algebra problem and a trig problem, I think calculus makes it unnecessarily complicated. How do you figure? You have two circles of known radius, which means creating the general form of each is trivial. You know distance center to center from each other, which means you need only recenter one circle. Integrating c1-c2 is something easy enough a calc 2 student could do it. If doing a double integral is too hard, converting it to sin/cos and doing it via sin/cos makes it even easier at least in terms of performing the integral itself. Aaaand either way, a HP or TI calculator will do the integration for you. Hell, if you're savvy enough to use variables correctly, writing a function would be similarly trivial. f(c1r, dist to c2, c2r) = area of overlap. All the math done in less than 10 seconds. |
|
Quoted:
You're making it more complex than it needs to be. We don't care where the circles are. Only their relationship with each other. Finding the radical is one op. Two areas of circles. Two percentages of the area. Two areas of triangles. Two subtraction, one addition. This is five minutes worth of math, tops. All with simple trig and geometry. Quoted:
Quoted:
The first and only hard part is the to find the length of the radical (that is, the straight line connecting the two points at which the circles intersect). You should choose a x-y coordinate system and describe your circles in those coordinates. In this case, the circle, that is the locus of points forming the perimeter of the circle, are described by two equations (x-a)^2 + (y-b)^2 = R^2 (x-c)^2 + (y-d)^2 = S^2 Where circle one is centered at (a,b) with radius of R and circle two is centered at (c,d) with radius of S. That is to say, the set of xs and ys that simultaneously satisfy both above equations will be the points of interesection of the two circles. Solve these two equations simultaneously for (x,y). You should get quadratic equations for x and y. If you get two real roots for x and y, then you have a normal intersection. If you get repeated roots, the circles are tangent and there is no intersection area. If you get imaginary roots, the circles don't intersect. The only corner case is the degenerate case of two identical circles, which is not interesting anyway. This algebra is identical for both cases you describe in your figure (i.e., it does not matter if the center of one circle is interior of the other circle). It is best to choose your x-axis (or y-axis, same thing) so that it coincides with the center-to-center line of the two circles. That way, you need only solve for a single x (or y), and the only quadratic is in y (x). After you find the two endpoints of the radical (x1,y1) and (x2,y2), you compute the length of the radical as L = sqrt((x1-x2)^2 + (y1-y2)^2). The intersection area is then just algebra on the areas of the two circular segments and the two triangles. EDIT: This link gives a complete solution to your problem: http://mathworld.wolfram.com/Circle-CircleIntersection.html You're making it more complex than it needs to be. We don't care where the circles are. Only their relationship with each other. Finding the radical is one op. Two areas of circles. Two percentages of the area. Two areas of triangles. Two subtraction, one addition. This is five minutes worth of math, tops. All with simple trig and geometry. Pretty much. No need to complicate things with only two circles and no topographical requirements. If it's one thing these math/physics degrees are teaching me, it's avoid complicating the problem. They tend to be complicated enough on their own and don't need your help.
|
|
Quoted:
I would solve the problem on the right by subtraction using the areas defined by the chord and radii. Show which part of the overlap you want on the right. You might find a single solution by resorting to analytic geometry and a set of equations that define the circles and how they are located with respect to each other. Not the way to bet. What he said |
|
Quoted:
So this is one of the solutions that only works for the type of geometry seen on the left (either that, or I coded it wrong) ![]() Quoted:
Quoted:
That's a good one. Not sure I could have figured it out myself. But, my google friend says this is the page you want. area of intersecting circles Quoted:
http://mathworld.wolfram.com/Circle-CircleIntersection.html So this is one of the solutions that only works for the type of geometry seen on the left (either that, or I coded it wrong) ![]() Yup. So the solution I found earlier today is valid, but only works for the specific case on the right. The solution posted in the link is a correct general solution. I just made a silly sign error - I calculated the last segment with all the stuff under the square root as a negative, then subtracted it from the other two portions, effectively adding the positive value rather than subtracting anything. I knew there was something fishy about areas that were 40% larger than the max possible value
|
|
The same techniques used to figure the left diagram can be used to figure the right. You may have to use the values a little differently (figure which lobes get added together), but the info derived from running the triangles and circle area/arc segments is all you need.
I don't know any calc, admittedly. I'm pretty damned good at shop math, though. Time is money and I don't have a lot to set up complicated graphs. I need correct info, quickly and be able to double check it. Knowing the hows and whys of trig and geometry have carried me along for 30 years being able to "hillbilly" my way through stuff like the OP, compound angles, plotted cam surfaces, helical angles, etc with just simple trig and geometry and a smattering of algebra aka the debil.
I'm sure, at some level, calculus would become necessary. My mech engineer buddies haven't needed it.
Thanks for the exercise, OP. |
|
I got a limited version of this working correctly, but of course there are still some bugs to work out after I put it into the actual program.
It's kind of funny, because the task that I needed this formula for basically produces information that I'd file under "nice to have, but not needed". I spent way more time on this part than I'd like to admit, but I enjoy this stuff so it all works out In addition to reminding me that I need to brush up on my math skills, this project has also helped me learn to code in Perl (for some reason, the people I work with absolutely LOVE Perl). This is definitely a good thing to learn, because our entire operation basically runs on a ton of tools taped together with Perl
Thanks for the help guys, much appreciated! |
|
Quoted:
I got a limited version of this working correctly, but of course there are still some bugs to work out after I put it into the actual program. It's kind of funny, because the task that I needed this formula for basically produces information that I'd file under "nice to have, but not needed". I spent way more time on this part than I'd like to admit, but I enjoy this stuff so it all works out In addition to reminding me that I need to brush up on my math skills, this project has also helped me learn to code in Perl (for some reason, the people I work with absolutely LOVE Perl). This is definitely a good thing to learn, because our entire operation basically runs on a ton of tools taped together with Perl
Thanks for the help guys, much appreciated! Ah, there's why calc isn't a good idea. Np. Glad you got something working. |
|
I tried to reply earlier but my tablet died.
For the left: https://en.m.wikipedia.org/wiki/Circular_segment This is the area formed by a secant line. Use the two points of intersection as the points for the secant, find the area and multiply by 2. That is assuming that the circles have equal diameters. here is an example problem worked out http://www.analyzemath.com/Geometry/circles_problems.html Here is another paper that is more generalized for two circles of any diameters. https://www.eecis.udel.edu/~breech/contest.inet.fall.12/problems/intersection-2circles.pdf Just for fun: more links: https://math.stackexchange.com/questions/325499/expected-area-of-the-intersection-of-two-circles https://math.stackexchange.com/questions/402858/area-of-intersection-between-two-circles I like stackexchange. They have a lot of good discussions about different math problems. http://mathworld.wolfram.com/Circle-CircleIntersection.html this might be a little easier to read//understand now with a video solution |
|
Quoted:
So I'm making a tool for work, and part of what I'd like to do involves finding the area overlapping between two circles (actually circular projections, but that makes no difference). I'm running into some trouble though. There are a few different cases, but the image below describes the main ones. http://i.imgur.com/ZYlk0rP.jpg?1 I've drawn in the angles from the circle centers to the points where the circles intersect. Finding these angles seems to be a critical point of most approaches I've seen. The portion on the left is relatively straightforward to find the area of intersection ( when the circles slightly overlap). The thing is, when the case is like the one shown on the right, every approach I've tried breaks down and starts spitting out either imaginary numbers, or wildly incorrect values. Does anyone know an approach that will hold for both cases? Or if nothing else, an approach that will give the overlapping area in the 2nd case? ETA: I'm looking for a general solution that will work for any amount of overlap. Also, the radii are almost always different (they are found during program execution, so there aren't really fixed numbers to work with). Thanks for your help! Sketch it up in ProE or equivalent.
|
|
Not sure if this is helpful but here is an online calculator.
Put in the parameters of your circle. I'm not sure the radii or the distance, but if you provided that info it would be helpful http://www.calcul.com/circle-circle-intersection k is the area |
