Home > ActionScript 3.0, FOAM, Mathematics, Physics, Uncategorized > ActionScript 3 Rigid Body Physics Engine

ActionScript 3 Rigid Body Physics Engine

September 8th, 2007

I started work on a 2D rigid body physics engine that I’ll be releasing as open-source. There are a few AS3 physics engines out there- Fisix, APE, the unreleased Motor… and while I’m sure this will fill a few holes, I’m most interested in it being a resource for developers wanting to simulate physics, as I’ve had trouble finding a comprehensive source of the hows and whys.

Here’s a demo. Use left and right arrow keys to spin the wheel. You can grab the movable objects and toss them, too.
Foam Bezier Demo

As it gets further into development I’ll write some tutorials to explain some of the engine’s inner-workings etc.

Current Features:

  • Rigid body simulation
    • Arbitrary convex polygons
    • Circles
    • Cubic Bezier curves
    • Lines
  • Constraints
    • Springs
    • Bungees
  • Easily swappable numerical integrators
    • RK4
    • Euler
    • Midpoint
  • Separation Axis Theorem based collision detection
  • Modular force generation

Next up is splitting collision detection into coarse and fine phases via spatial partitioning.

Oh- and I’m calling it FOAM.

drew ActionScript 3.0, FOAM, Mathematics, Physics, Uncategorized

  1. September 19th, 2007 at 11:39 | #1

    when are you gonna get to work on soft bodies?
    i want to see ropes and cloth and flags flapping in the wind!
    just kidding. this rocks!

  2. October 24th, 2007 at 15:34 | #2

    When will you be releasing source code?

  3. drew
    October 24th, 2007 at 18:23 | #3

    It’s currently in a transitional period- I hope to have an alpha released within the next 5 weeks. What I’m hoping to do really kind of makes or breaks the project in my opinion, but I’ll release it all the same.

  4. January 9th, 2008 at 18:56 | #4

    a tutorial please!!!

  5. August 4th, 2008 at 02:20 | #5

    Can you provide the source for this one?

  1. No trackbacks yet.