Some rotation code. Not sure if it's being applied correctly.
Implement sample-motion-model