I would like to perform a 3D rotation about its COM (centre of mass), in terms of theta and phi. Not about the axes. I did have a piece of code to do this, but have lost the official reference for where I saw this worked out in more detail. I know it was a coupled combination of a rotation by theta and then phi for example.
The problem is I have implemented code that I wrote 2.5 years ago and cannot find my reference to how I actually performed the COM part. Its quite involved and I suspect it involves rotating the co-ordinate axes. I am rather embarrassed because I cannot remember the reference… “Let this be a lesson to you all”. I now my code words and use it, but cannot remember how I came by it in the first place and now hoping if you guys might know.
I must confess that I am using the routines for some programming outside out OpenGL, so unfortunately need to be able to use it independent of the opengl routines…
Any reference to how this is done by hand would be appreciated!