Thank you for the time and patience you put into this guide.
I somehow managed to read all of that without getting a headache
/bow before the master.
I got stuck on the first few paragraphs. I can't cope with imaginary numbers!
.siht daer ot gniyrt emit detsaw ev'uoY
ThanksOriginally Posted by relliktsohg
Here is a method for you: forget about "i" being imaginary, treat it like it was real number of an unknown value, an "x" in the equation. Then proceed just like it was a normal real-number equation, so you get something like 5+2i-3i^2+8i^3 etc, you get the idea. Now remember that i^2 is -1: you get 5+2i+3-8i = 8-6i.Originally Posted by Whosdr
With quaternions it's similar, except you need to take care of the order in which you multiply, and you have 3 "unknown numbers". So, an example result of an equation can be 4-3k+i7j+4i5k-k9j1. Tip: you can move real numbers around, so you get 4-3k+7ij+20ik-9kj. Now apply multiplying rules: 4-3k+7k-20j+9i = 4+9i-20j+4k.
My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
My tutorials: applyTorque - Quaternions - PID controllers
Some other things I made: FT Chip - RK4 Solar System
I've been trying to help 3dfactor over here, but I can't seem to make any progress. This would be easy as pie if I could just set the direction vectors of the hologram, but you can't do that without transforming them to a PYR angle.
Since I find PYR even more impenetrable than a 4-dimensional imaginary number, I'm now looking for the quaternion that corresponds to given world direction vectors Forward and Right.
My first thought would be to use Basequat = quat(Forward:toAngle()) and Rotquat = qRotation(Forward,acos(Basequat():right():dot(Righ t))) to get the orientation I want, but I'm not sure how to chain rotations in quaternions and my results have been less than stellar. Maybe you could swing by and help us a little?
I can wire anything directly into anything! I'm the Professor!
-Professor Hubert Farnsworth
Answered in the other thread
Ok, let's see how this works in detail. Assume we have two quaternions, A and B, and we want to rotate a vector V first using A, then using B. What will be the resulting rotation?Originally Posted by Magos Mechanicus
As I wrote in the tutorial, vector V rotated with quaternion q is q*V*(q^-1). So, V rotated with A will be:
RotatedV = A*V*inv(A)
Then with B:
RotatedV2 = B*RotatedV*inv(B)
But this is the same as:
RotatedV2 = B*A*V*inv(A)*inv(B)
This may not be obvious, but inv(A)*inv(B) = inv(B*A), so:
RotatedV2 = (B*A)*V*inv(B*A)
This means that the resulting rotation is B*A (notice the reverse order - the first rotation will be the rightmost quaternion).
My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
My tutorials: applyTorque - Quaternions - PID controllers
Some other things I made: FT Chip - RK4 Solar System
This is an awesome tut, thx for the help
I hope you're still reading this thread Fizyk, cuz I need a little bit of explaination
I was able to somehow take all this in and it's helping me in so many ways, but can you plz clarify the meanings of the M and N constants.
I know I'm supposed to modify them to get the best possible performance for my needs, but it would help alot if you could explain their purpose. I usually end up spending about 20 min trying to find those perfect values.It would make that time alot shorter if I knew what they actually did.
hehe, i think i may come back to this thread when we've finished complex numbers and quaternions in school![]()
Haven't sat down and read it fully yet, but if it contains any stuff to help with applyTorque and avoiding gimble lock, then I love you.
EDIT: I love you.
Bookmarks