How To Use Quaternion Rotation In Blender
Before explaining how these rotations work we ll need to define a few terms first.
How to use quaternion rotation in blender. In my project i have used a complimentary filter to generate yaw roll and pitch angles. Inverting or conjugating a rotation quaternion has the effect of reversing the axis of rotation which modifies it to rotate in the opposite direction from the original. Follow blendernation twitter facebook google tumblr pinterest. Create a new quaternion object from initialized values. List pylist of int float a 3d or 4d list to initialize quaternion.
It s actually pretty simple. Numbers make up everything we do on computers including blender. My temporary solution current looks like. Blender is the free open source 3d content creation suite available for all major operating systems. A bit of a discussion about quaternion rotations started on this thread but it was off topic.
The easiest way i found is to use the rotation quaternion but this member only guarantees to store the rotation when the rotation mode is set to quaternion. I used the rotatex rotatey and rotatez functions to rotate a box in 3d. For rotation quaternions the inverse equals the conjugate. Don t be frightened by the length. For those who are interested let s continue it here.
So for rotation quaternions q 1 q q 0 q 1 q 2 q 3. Open blender delete the default cube add a monkey and switch the rotation mode to quaternion i know not much of a challenge yet for most of you but wait fill in the w x y z fields so that suzanne rotates 180 around the axis that goes through 0 0 0 and 3 4 5. I am writing a blender exporter for my scene format. 1 in computers everything is represented by numbers. I ran into problems like gimbal lock when using this method.
A proper explanation would involve much less talking and a couple. Now i m using a quaternion based complimentary filter to generate quaternions that represent the orientation of the box. Quat quaternion 1 2 3 4 quat quaternion axis angle quat quaternion quat quaternion 180 list parameters. We provide daily news art and tutorials. Quaternions are 3d rotations performed by the multiplication of quaternions.