coderJeff's Home Page

Main

My FB Stuff

Extern links

Information

Rigid Body Dynamics

An implementation of 2D rigid body dynamics using FreeBASIC. Many problems yet to solve. Still in development.


Rigid 2D  -  rigid_souce.zip 36 K

All in FreeBASIC. No additional libraries needed. Program will compile/run under fb.15, fb.16, win32/linux. It supports the following:

  • linear and angular momentum in 2D
  • Collision detection/resolution for object/world and object/object interactions
  • Scene files to describe shapes and objects to be used in the simulation
  • Elastics which can be added realtime during the simulation either object to object or object to world. using the mouse.
  • Controls for zooming/panning the scene, restarting, and deleting all eleastics.

All instructions are in the readme.txt, but here's a summary:

make with `mkrigid.bat' or `./mkrigid.sh'
run with `rigid [scenefilename]'

where [scenefilename] is the name of a scene. Defaults to default.ini if not present. I have included some simple scenes to try out in addition to the default.