General Three dimensional Rotations
A rotation matrix for any axis that does not coincide with a coordinate axis
can be set up as a composite transformation involving combination of translations
and the coordinate-axes rotations.
-
Translate the object so that the rotation axis passes through the coordinate
origin
-
Rotate the object so that the axis rotation coincides with one of the
coordinate axes
-
Perform the specified rotation about that coordinate axis
-
Apply inverse rotation axis back to its original orientation
-
Apply the inverse translation to bring the rotation axis back to its original
position
...
In Java 3D no way to define directly a general rotation, but at least, it is
possible to easily define a rotation around an axis that goes trough the origin