Split quaternion into axis rotations
I have a quaternion representing the orientantion of an object (yellow box and sphere). I would like to know if it is possible to split that quaternion into other quaternions that give us the rotation of each local axis (X, Y and Z). What I have been doing until now is getting the Euler representation and work with it, but it is not the correct solution for my particular case: Given two points (blue boxes), I want to limit the orientation of my object so that it can't point out of the grey plane, even if my quaternion looks out of that plane. I want to split (decompose) the quaternion, because