Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > The Academy > Tilted Knowledge and How-To


 
 
LinkBack Thread Tools
Old 01-21-2008, 12:53 AM   #1 (permalink)
zomgomgomgomgomgomg
 
telekinetic's Avatar
 
Location: Fauxenix, Azerona
Math help: intersection of two circles?

So, as a part of a larger excel 'program' I'm writing, I need a formula that will let Excel find the intersection of two circles when given their radii and the x and y coordinates of the center. It does not have to check for an intersection--in the range I'm using it for, they will always intersect. Also, they will always intersect at two points.

Any ideas? The best sources I've found on the web are:

http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/

and

http://www.sonoma.edu/users/w/wilson...s/default.html

but neither of them seem to lend themselves handily to easy translation into a single cell (or small set of cells) in Excel. Ideally I want this to be something nice and concise, so that I can automate finding these intersections with large sets of data, as a part of an optimization exercise.

TIA, any help is appreciated
__________________
twisted no more
telekinetic is offline  
Old 01-21-2008, 03:03 AM   #2 (permalink)
Aurally Fixated
 
allaboutmusic's Avatar
 
I'm not going to be much help - I'd have done it the same way described.

I would find the distance between the two intersection points, get the area of the two sectors (defined by the radii of the two circles and the arcs between the two intersection points), and subtract the area of the two triangles (defined by the radii of the two circles and the chord between the two intersection points).

I have a feeling some optimisation can be done based on finding the length of the chord, and using basic trigonometry to simplify the formula to find the area.

Last edited by allaboutmusic; 01-21-2008 at 03:06 AM..
allaboutmusic is offline  
Old 01-21-2008, 06:16 AM   #3 (permalink)
has a plan
 
Hain's Avatar
 
Location: middle of Whywouldanyonebethere
Well you are going to have to make some compromises, unless you really want to work on the algebra. And small number of cells is arguable.

I went at this from scratch, doing essentially what the first website describes. Attached is a ZIP with the XLS inside it. Some differences between mine and the site's is that I have more intermediate steps, hopefully allowing you see get where it is all coming from. Also, I use P+Q=D (the distance between the centers).

UPDATE: You can rearrange your chart so that no one has to see the intermediate steps you take. Just insert some space and move the intersection data after your x, y, and r input, then move the remaining intermediate steps to after that. Also, I just thought of it, if you do have erroneous data, you can multiple the affected values by L-TEST so that your results are zeros and not invalids.
Attached Files
File Type: zip circle_intersection.zip (5.8 KB, 82 views)
__________________

Last edited by Hain; 01-21-2008 at 09:52 AM..
Hain is offline  
Old 01-21-2008, 11:49 AM   #4 (permalink)
zomgomgomgomgomgomg
 
telekinetic's Avatar
 
Location: Fauxenix, Azerona
Thanks Augi!

I'm making an excel spreadsheet to analyze (and eventually optimize) a specific type of 4-bar linkage. I always have one vertical link, and, for the purposes of the analysis, I step the bottom link in 5 degree incriments.
What I'm doing is using intersection of two circles to enforce compatibility on the floating link and the top rotor, by 'drawing' a circle with a radius the length of the floating link at the end of my bottom rotor, and 'drawing' a circle the length of my top rotor at the top of my stationary link....thus finding the point the links interesect. That's about all I can say without an NDA, but if you're more curious, I can PM you more detail about the specific application as thanks for your help
__________________
twisted no more
telekinetic is offline  
Old 01-21-2008, 12:03 PM   #5 (permalink)
has a plan
 
Hain's Avatar
 
Location: middle of Whywouldanyonebethere
OH Christ this sounds like what we did in lab for 3 hours today. Sit in front of a screen and model 4-bar linkages... because they are so fucking thrilling!

Let me guess: 4-Bar, Working Model... and... Solid Edge? If this is cool you are using a vectorizing program on scanned blue prints. This analysis can be made easier if you use MATLAB (assuming you have it available). It can read and write to Excel documents.

Wait wait wait... An NDA... Non-Disclosure Agreement? {Yeah I am a quick one to catch on.}
__________________

Last edited by Hain; 01-21-2008 at 12:09 PM.. Reason: Automerged Doublepost
Hain is offline  
Old 01-21-2008, 12:18 PM   #6 (permalink)
zomgomgomgomgomgomg
 
telekinetic's Avatar
 
Location: Fauxenix, Azerona
Yeah, this isn't for school, it's for work, hehe. 4-bar linkages actually do have real world applications. I'll send you a PM with the details, and maybe you'll have a better approach than my brute-force excel method :-D
__________________
twisted no more
telekinetic is offline  
Old 01-21-2008, 02:19 PM   #7 (permalink)
has a plan
 
Hain's Avatar
 
Location: middle of Whywouldanyonebethere
Crazy stuff there. I can't find the links to the 4-Bar program, nor to the MIT Open Course Ware with the MATLAB code that supposedly analyzes the same thing. Maybe someone else will peek in here and know what we are talking about.
__________________
Hain is offline  
Old 08-04-2010, 07:35 AM   #8 (permalink)
Upright
 
I'm brand new here. I discovered the site while looking for a way to calulate the intersection area of two circles given their radii and distance apart.

I would like to get a copy of the circle intersection.zip spreadsheet in Hain's post, but when I download the file liked in HAin's post, I get a corrupt file error when I try to unzip it. Any help would be appreciated.

Thanks

Mainelion
Mainelion is offline  
Old 08-04-2010, 08:25 AM   #9 (permalink)
Tilted Cat Head
 
Cynthetiq's Avatar
 
Administrator
Location: Manhattan, NY
you must be doing something wrong as I just downloaded it and it unzips just fine. try again, and if it fails send me a PM and an email address.
__________________
I don't care if you are black, white, purple, green, Chinese, Japanese, Korean, hippie, cop, bum, admin, user, English, Irish, French, Catholic, Protestant, Jewish, Buddhist, Muslim, indian, cowboy, tall, short, fat, skinny, emo, punk, mod, rocker, straight, gay, lesbian, jock, nerd, geek, Democrat, Republican, Libertarian, Independent, driver, pedestrian, or bicyclist, either you're an asshole or you're not.
Cynthetiq is offline  
Old 08-04-2010, 12:07 PM   #10 (permalink)
zomgomgomgomgomgomg
 
telekinetic's Avatar
 
Location: Fauxenix, Azerona
Wow cool, blast from the past. Since I don't work there anymore, what I was doing was calculating 4-bar linkages for TV mounts to simulate 'zero gravity' for tilt. What I mean by that: I was trying to find a linkage combination that kept the center of gravity at as close to the same height for any tilt angle as possible. This cancels any effect gravity would have at undoing the desired tilt angle you just set your TV to. If I get a chance I'll dig up some diagrams to explain it better.
__________________
twisted no more
telekinetic is offline  
Old 08-04-2010, 02:02 PM   #11 (permalink)
Upright
 
Thanks for the offer. I put together a sheet myself that seems to work OK. I tried downloading the file again and I still get the message "The compressed (zipped) folder is invalid or corrupted" when I try to unzip it.

It would be interesting to compare the two files. I sent a PM with my email if you get a chance to send it along.

Thanks
Mainelion is offline  
Old 08-04-2010, 04:36 PM   #12 (permalink)
Junkie
 
filtherton's Avatar
 
Location: In the land of ice and snow.
Quote:
Originally Posted by telekinetic View Post
Wow cool, blast from the past. Since I don't work there anymore, what I was doing was calculating 4-bar linkages for TV mounts to simulate 'zero gravity' for tilt. What I mean by that: I was trying to find a linkage combination that kept the center of gravity at as close to the same height for any tilt angle as possible. This cancels any effect gravity would have at undoing the desired tilt angle you just set your TV to. If I get a chance I'll dig up some diagrams to explain it better.
Were you able to do it? I remember linkages from one of my ME classes. All I remember about them is writing a matlab code using complex exponential functions.
filtherton is offline  
 

Tags
circles, intersection, math


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 11:10 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360