I'm working with quaternions and I have a little problem.
I have an object (The violet line) and a quaternion relative to the rotation axis (Black line), and I want to convert this quaternion in local space, so that the rotation axis become the object.
I need to calculate the roll of the object (Which will be the Y rotation in local space that I will convert to axis angle) and then calculate the X and Z rotation in Axis Angle.
Here is a scheme that I drew to a better understanding of the question :
To understand you can think of your shoulder, when you move your arm you have the X and Z which will determine the forearm position and the Y which will determine the rotation of your elbow.
Do not hesitate to ask for clarifications, since it can be hard to understand what I'm searching for.
Is there a formula or an algorithm that I can use to do so ?
Is there 3D programmers who worked with quaternions and who can clarify me on the subject with an algorithm or just words?