Excellent... looking really good.
Question though... HOW did you get it going in the end?
Or did you re-build your "rotate_on_surface" function?
[EDIT]
HERE is MY version of the code MrSmith posted.
Its BASICALLY the same, Ive just compacted the code a lot, and done some minor bug-fixes,
AND Ive made the functions more 'controllable' with added parameters...
Enjoy... Hopefully someone may find some useful tidbits in there of use or interest...