Get your geek on!

by ShadowStalker on October 17, 2004 · 14 comments

in Diversions,Sci-Tech

We all know that lasers kick ass, but beyond a passing familiarity with Real Genius most people don’t realize how cool physics can be.No really.  A great example is two pendula attached end to end.  Sounds simple, right?  Yet, this simple system yields incredibly complex, chaotic motion.  Inspired by this site, I decided to throw together an “accurate” physical simulation of this system.

You can drag the pendulum bobs around, and the little red dots set the initial angular velocity.  If you’re a precision-oriented type, you can enter values in the boxes.  Then hit go and let ‘er rip!


Click here for hot pendulum on pendulum action!

Technical details behind the curtain…

I have to thank Eric Weisstein for deriving the equations of motion for this system on this ScienceWorld site.

This simulation solves eqs. (14) and (19) on the above ScienceWorld page with a fourth-order Runge-Kutta solver.  An adaptive step-size algorithm would increase accuracy, and may be implemented later.  Gravity is a constant 9.8 m/s.  There is no damping, the pendulum arms are massless, and the connections are frictionless.  Values displayed are in SI units, except the angles which are degrees for ease of use.

Any other questions, feel free to ask here or email me.

  • Reddit
  • Google Bookmarks
  • Digg
  • LinkedIn
  • RSS
  • StumbleUpon
  • Yahoo! Buzz
  • Posterous
  • Tumblr
  • suitep

    Well, that was cool. I played with it for quite awhile, and even after walking away from the computer for a bit, I’d come back to find a blue doughnut.

    But after tweaking the fields a bit, I ended up with a kielbasa.

    I could stand to be a tad geekier.  rolleyes

  • mrcookieface

    Your pic looks like a little fetus.

    Yay for the fetus!

  • .alphamonkey.

    Can’t……look…..away……must watch……

    Damn,’ve created a modern day SpiroGraph without the debilitating stigma. Since I’ve arbitrarily given myself the ability to give new names, your Transformer name is now: Nerdicron.

    Tres cool, my friend.

  • Shadow Stalker

    I thought the same thing after a few hours of testing–spirograph without all the pins.

  • FlyBoy311

    I want a cool name… =(

  • .alphamonkey.

    It’d be neat to be able to export the final product.

  • Oraxis

    What the heck do “Goo-Goo Kins”, “Boo-Boo juice”, and “SUPPORT KERRY !” have to do with kick-ass double-pendulums?  Did someone open the loony door?

    Now, as for the physics behind the pendulum program, something seems wrong to me.  If I make the top ball’s mass 1 and the bottom ball’s mass 100, and then I have them both straight down and I give the top ball a little nudge, you would think that the bottom ball would pretty much weigh things down so much that it would barely wobble.  Instead, it starts floating upwards, almost angelically.  Have I found a flaw in Newtonian physics?  Here’s the settings, if you want to try my controversial ”heavy angel“ experiment:  0, 0, 20, 0, 1, 100, 5, 5

  • Shadow Stalker

    Yeah, I know.  The thing is, these equations can’t be solved in closed form, so I have to numerically solve them.  Think of it like you’re walking across a field.  Before each step, you ask me which way to turn.  I look at a chart, and based on where you are you should turn x degrees to your left; you turn then take one step, and so on.  After one step, you’ll be a little off because you won’t be able to turn exactly x degrees, and the length of your step will be different than mine, so the next direction will be a little off because you won’t be in exactly the right place.  All these little errors compound until you fall off a cliff.

    So when the numbers are within a certain range, the solving method that I used is pretty accurate and you get consistent results.  But if you put in numbers that are too big or too small, the errors get very big quickly, and you get a bad solution.  Rounding errors can also influence the solution, because computers can only store a finite number of digits.  All the tiny bits of numbers that get thrown away can add up to a large error.  You can see this if you find a configuration that should be periodic, where it traces almost the same path over and over.  It should probably be exactly the same path, but small errors throw off the solution a bit.

    So, numerical analysis can get tricky.  For an actual mathematical description, look up Runge-Kutta to get started (assuming you understand differential equations).  In this program, mass seems to be a very sensitive quantity.  I don’t really know why, but it’s probably because the masses are factors in every term of the equations for the angular acceleration.

  • Oraxis

    Darn.  I was hoping to use a loophole in physics to launch myself over my house tonight using a stiff wire and a 2-pound weight.

  • .alphamonkey.

    As SS is fond of saying: “Come with me and you’ll be in a woooooorld of pure imagination.”

  • Davion

    this pendulum only works on the moon silly.  Jeeez!

  • mrcookieface

    I totally can’t stop playing with this!

    Kick ass, Shadow.

    Make more cool stuff like this, k?

  • Shadow Stalker

    Are you saying my Automatic Poop Grading Machine wasn’t cool?

  • olivesmarch4th

    I am so impressed.  You make me feel like a little kid again playing with my plastic Spirograph discs.  *happy sighs*

Previous post:

Next post: