Make these gears in code.
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

http://www.mathpuzzle.com/LoonyGearsAnimation.gif

I love the way they look. I want to use the code to render them in different styles, or perhaps generate bigger/more-complicated ones.

Doesn't matter what language, but it should be done in a way that let's you visualize the solution and verify that the code works.

Here's some info on the source of the image. http://www.mathpuzzle.com/17Dec06.html
search this page for "looney gears"

Take a look at this d3 (javascript visualisation library), it has an gear example. Perhaps a solution could be based on this approach: http://mbostock.github.com/d3/talk/20111116/gears.html
iambigred over 9 years ago
Wow... not sure if it will or won't be helpful (might well be), but the examples on that site and the rest of visualizations are super cool regardless.
michael_legrand over 9 years ago
Here is the example of how it's done in mathematica with source code http://demonstrations.wolfram.com/LooneyGears/
shtirlic over 9 years ago
That's really cool too. So far I feel like I'm hiring people to be better at Google than me :). I'll totally award a solution for that answer unless someone posts something better. Thanks.
michael_legrand over 9 years ago
The guy who made the original responded with his code... can't beat that.
michael_legrand over 9 years ago
sure, and thx for great bounty post
shtirlic over 9 years ago
awarded to Wikimedia via Andreas
Tags
math

Crowdsource coding tasks.

1 Solution

Winning solution
Tipped

I've uploaded the sources to my website that I used to create the animation at http://www.andreas-roever.de/files/loonygers_source.zip.

Beware though. I have not cleaned them up. In the beginning of the main function is a little section that does contain the setup for the loony gear. So when compiled unchanged you will just get an animation. When you deacitvate that section the code that actually calculated the positions of the gears is run. But this is no simple mathematics.