Matrices and Euler angles can suffer from Gimbal lock but what are some other arguments for using one over the other?
What do you think DirectX favors?
What do you use in daily C++/C/DirectX programming?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Euler angles only require three parameters, as opposed to storing a matrix (or three, but that sounds excessive). When you apply the Euler rotation, however, you will possibly end up with something equivalent to three matrix multiplications to create the transformation. If you were only using a matrix, you might not incur such an expensive cost (depending on how the matrix was constructed). Besides Gimbal Lock, there is also a problem with cancellation effects when interpolating matrix representations of rotations that you need to be careful about.
You might want to consider quaternions. They require four parameters of storage, so they are not very heavy. They avoid Gimbal lock and can be interpolated for rendering smooth rotations. One thing that can be interpreted as a downside for the quaternion is that they may not be very intuitive for some. Matrix transformations and Euler angles have a type of roll-yaw-pitch or spin-precession-nutation that is pretty intuitive. Quaternions are more akin to a single rotation about some end-result axis sticking out this or that way.
There are probably cases where someone would prefer one method over the others, so these are just some things to consider when making a decision.