I am currently trying to implement a virtual arcball in OpenGL utilizing GLUT library. As of now I am calculating the axis of rotation and angle of rotation by doing standard arcball computation on old and new coordinates of the mouse. But I want to obtain the angle theta1, theta2, theta3 , such that rotation of the object about X axis by theta1 , about Y axis by theta2 and about Z axis by theta3 would yield the same effect as before.
What you want is to go from axis-angle to three Euler angles. Look into wikipedia rotation conversions . There you can go from axis-angle to quarternion and then to euler angles, or alternatively via the full 3x3 rotation matrix.
Look also into what is called the Rodrigues parameters to help in the conversion. To first rotate about X, then Y and then Z you want to do RZ(t3)*RY(t2)*RX(t1)
.
In your case it might be easier to construct the 3x3 rotation matrix and use OpenGL to transform the modelview based on the matrix, instead of the 3 sequential rotations.