Example code from a 2D ragdoll Windows Phone game