- #1
Septimra
- 27
- 0
I was thinking that if you could use quaternions to rotate an object using quaternion algebra that there might be a way to rotate an object using complex numbers in some fashion. I was looking at quaternion rotation of a vector and the amount of operations seemed to be a lot. Of course it levels out or even out performs matrices with linear interpolation and concatenation of rotations. But anyhow what i decided to do was rotate a vector (x ,y , z) = x + yi + zj
with the rotation complex numbers
(a + bi)
(a + bj)
a = cos
b = sin
Following this algorithm
(a + bi)(x + yi) = x' + y'i
(a + bj)(y' + zj) = y'' + z'j
the new rotated vector is x' + y''i + z'j;
This works, it rotates the object and preserves the magnitude of the vector.
What I don't understand is how it is rotating the object.
When I put in 90 degrees v(1,0,0) goes to v(0,0,1) to (0,-1,0) back to (1,0,0)
When I put in 90 degrees v(1,1,1) goes to v(-1,-1,1) to (1, -1, -1) to (1,1,1)
My question is: Is it rotating around an axis? Can it be changed? Is it Euler angles in disguise?
Why is it the first time it rotates by 90 degrees when I put in 90?
Then it rotates 180 when I still have 90 degrees in?
with the rotation complex numbers
(a + bi)
(a + bj)
a = cos
b = sin
Following this algorithm
(a + bi)(x + yi) = x' + y'i
(a + bj)(y' + zj) = y'' + z'j
the new rotated vector is x' + y''i + z'j;
This works, it rotates the object and preserves the magnitude of the vector.
What I don't understand is how it is rotating the object.
When I put in 90 degrees v(1,0,0) goes to v(0,0,1) to (0,-1,0) back to (1,0,0)
When I put in 90 degrees v(1,1,1) goes to v(-1,-1,1) to (1, -1, -1) to (1,1,1)
My question is: Is it rotating around an axis? Can it be changed? Is it Euler angles in disguise?
Why is it the first time it rotates by 90 degrees when I put in 90?
Then it rotates 180 when I still have 90 degrees in?