Wonderful explanations. Your videos on geometric algebra and 3D rotations are the best I have ever seen on this subject. Thank you.
@craigmatthews45174 жыл бұрын
This was great! Really appreciate working through the examples. I have seen some people try and explain Quaternions visually, but it left me scratching my head and I don't have a lot of hair to begin with.
@dorkusschmleck97816 жыл бұрын
I am a math junky who after 48 years of life on earth with no mention of quaternions has now run into them twice in one year - in robotics and in 3D animation software. Your videos are totally perfect for teaching me what these things are. Edit - Feel free to read my comment below but I figured out where I was going wrong after watching the next video in this series. I had thought that e^(i + j + k) would be (cos + isin)*(cos+jsin)*(cos+ksin), but that is incorrect even though I am following the laws of exponentiation properly. The actual answer is ( cos + isin + jsin + ksin), much easier but not intuitive to me. ____________________________________________________________________________________________ That being said, I wanted to explore the v' = (e^(theta n))v you gave us at 19:25 I want to do a more difficult example. I want to rotate the vector k 90 degrees around vector i + j, and since k is perpendicular to i + j the magic formula above should work. But something is amiss in my calculations or assumptions. v' should be e^((pi/(2*sgrt(2))*(i + j)) k . (the sqrt(2) is from normalizing i + j). PI/(2*sqrt(2) in degrees is approx 64, good enough for the example below. So we have: (cos64 + isin(64)) times (cos64 + jsin(64) times k which is ( cos(64)^2 + isin(64)cos(64) +jsin(64)cos(64) +ksin(64)sin(64) )k which is ( k c(64)^2 - (j s(64)c(64)) + (i s(64)c(64)) - s(64)^2) = MESS, I THINK Rotating K 90 degrees around i + j, by visual analysis, should give us (i - j)/sqrt(2) or (-i + j)/sqrt(2) depending on which way we go 90 . But I get the mess above. If anyone wants to chime in as to what I did wrong please do!
@allmycircuits88506 жыл бұрын
You were a little in hurry there. Let's write down vector n: n = (i + j) / sqrt(2) this square root of 2 is inside n, because it must be a unit vector for this formula to work properly. So v' = e^(pi/2 * n) k = (cos(pi/2) + sin(pi/2) n)k = 0 + nk = (i + j) / sqrt(2) * k = (ik + jk) / sqrt(2) = (-j + i) / sqrt(2) which is correct answer. The mistake was that you put 1/sqrt(2) multiplier into angle, while it should go into n vector and stay there, while angle remains to be 90 degrees!
@angelmendez-rivera3516 жыл бұрын
You also did not actually use the rules of exponentiation correctly. Notice that the rules are different for quaternions because multiplication is not commutative.
@roberthayter1577 ай бұрын
So clearly explained. Great video.
@zachreinke8 жыл бұрын
Keep up the excellent instruction!!!!
@mollejalopez8012 Жыл бұрын
Lo amo. Empieza desde cero y va construyendo todo ❤
@marcushellstrom11577 жыл бұрын
I like the guts of taking on the arbitrary hardship of quarternions explicitly in this day and age!
@01binaryboyАй бұрын
awesome explanation. Now, I can write my own library to write Quaternion utilities....
@TyTheRegularMan7 жыл бұрын
This is fascinating and mind-blowing.
@name.is.myname4 жыл бұрын
"As someone who believes in keeping the abstract nonsense to a minimum" Pffff i love you man. Keep up the amazing instructions 👌
@diegorblandon8 жыл бұрын
Thank you so much for the excellent instruction, please keep them coming.
@RickyMud4 жыл бұрын
At 12:41 shouldn’t the first component of the cross product be -(3^-1/2)
@saltcheese7 жыл бұрын
keep making these high quality insightful explanations. much appreciated!
@mohankrishnan20227 жыл бұрын
Excellent set of videos on Quaternions!
@mqrieck5 жыл бұрын
Very well done! (I would never suggest doing such a thing with your quaternions!)
@HowToDrinkMilkk Жыл бұрын
explained better than my professor!!!!
@cybernaut_ev31065 жыл бұрын
It's incredible the way you break this down. This is probably how the mathematics originated, by using diagrams and putting it together. Unfortunately, today, you're simply shown the math and left to your own devices. It's no wonder people can't understand quaternions. Your videos should be used to teach students where it all comes from.
@shif6744 жыл бұрын
Thank you so much! this is amazingly helpful!
@ThePixelkd4 жыл бұрын
Hey, love these video. I am trying to find out if there are any solutions for a specific application for games and animation. Specifically, I am trying to represent 3d rotation with a 2d animation rig. I know that I can represent rotation with a subset of images (front, 3/4, profile, etc..) and that the rest can be created using rotations of those flat images (head tilting to the side, for example). Do you know of any work that has dealt with this issue using quaternions before? Thanks for all the awesome videos!
@sarthakghosh16355 жыл бұрын
This is the best video ever!!
@danielbodmer61686 жыл бұрын
Excellent explanation!! But why do you call the axis of the coordinate system x-y-z instead of i-j-k? I mean it is absolutely clear what you mean I was just wondering?! (I am speaking about your sketch at 21:20)
@angelmendez-rivera3516 жыл бұрын
Daniel Bodmer Because the basis of the coordinate system is known as the Cartesian basis, and Descartes used x, y, z.
@harshavardhansripathi664 жыл бұрын
Thank you very much man, I really wanna hug u man, I was having difficulty in understanding quarternions Every one nd every book tells me that they represent rotation nd no one tells why Love from India
@fizixx7 жыл бұрын
Hahahaha.....no, I'm not gonna tell you to shove your Quaternions. This is a very understandable, clearly explained piece on Quaternions. I hope you do more videos.
@datsnek7 жыл бұрын
Took me 2 months to forget all about cross and dot products. Goddamn holidays!;) Gonna take a stub at graphics programming with the knowledge of this stuff. Thanks/
@jananraj66806 жыл бұрын
Around the 8:20 mark, how did you derive it to be sin(theta) N x V’ ? Couldn’t derive it using the usual sine cosine trig rules
@angelmendez-rivera3516 жыл бұрын
Janan Rajaratnam It is in the video
@algerianteachersteam88057 жыл бұрын
thank you for this video. I like your way of explanation
@pgmz4 жыл бұрын
excellent explanations! Mind blowing!
@pratiktohidayat17467 жыл бұрын
sir, in 9:54 you change the n head compenent to a unit. does it efect the result of rotation in n head axis?
@angelmendez-rivera3516 жыл бұрын
Pratikto Hidayat you cannot rotate with respect to a non-unit vector, not technically or without modifications
@marcushendriksen84155 жыл бұрын
I'm a bit confused about quaternions. Going by this video, it's perfectly valid to use i, j and k as synonyms (for lack of a better word) for the x, y and z axes, and that these together comprise the "vector" part of the quaternion. That's fine, I completely understand the logic there. But what does the scalar part translate into in our 3D experience? The best answer I can come up with (using the normal complex exponentiation as an analogy) is that it "scales" the i, j and k components, thus scaling the total distance we would measure between the origin and the endpoint, say with a ruler. Is that right?
@michaelstark28322 жыл бұрын
The scalar parts are just the cos and sin of the angle we are rotating thru. They have nothing to do with the vector part. You decide what that angle will be. It's just the result of Hamilton's notation.
@kirtanvora37896 жыл бұрын
Fabulous Explanation
@kellywshere8 жыл бұрын
Great explanation! Thanks!
@andrewbeechey44025 жыл бұрын
Nice work :). Any chance you could also cover Octonions and/or Sedenions?
@zachreinke8 жыл бұрын
Great Examples!!!!!
@AchrajSarma4 жыл бұрын
How does the fact that n_hat and the plane pass through the origin factor in? Does it affect the formulae if we don't have that condition?
@habotssar84297 жыл бұрын
in vector analysis if you have n vectors in the Rn-1 space, any vector in this space can be expressed as a linear combination of the remaining n-1 vectors!
@qwertyqwerty007007007 жыл бұрын
Great video. Small question, why does the axis of rotation have to be unit?
@Math_oma7 жыл бұрын
+Aditi Hebbar It makes the derivation easy and allows us to use the fact that such a vector (written as a quaternion) squares to -1 which allows us to use Euler's formula. Supposing a given axis were not unit, it can be made unit by dividing by its magnitude anyway.
@nikhilbagul71894 жыл бұрын
This may sound stupid. At 7:55 I really didn't understand how vector along V was calculated as V cos Θ. Based on my understanding the projection is always |V| cos Θ. Can anyone please explain?
@nikhilbagul71894 жыл бұрын
@Pray Always I assumed that but wasn't sure if that is correct. Thanks a lot for clarifying the misconception here and shedding light. You are a real purist.
@diegodelponte90372 жыл бұрын
Nickhil I have the same problem
@EW-mb1ih18 күн бұрын
V’ is projected on the axis of V and on the axis of ^nxV. The projetion on the axis of V is obtained by V’cos (theta). But V and V’ have the same length so it V’cos(theta) is equal to Vcos(theta)
@anchansaxena89886 жыл бұрын
You should mention that v, v' and (n x v) are all equal to v in length. Then only your equation v' = cos(theta)*v + sin(theta)*(n x v) is valid otherwise it is actually wrong trigonometry if you state that directly.
@lamontalvo966 жыл бұрын
I'm confused, why is he not using the pythagorean theorem?
@eirikkvalheim86276 жыл бұрын
hahaha, Pythagorean xD
@angelmendez-rivera3516 жыл бұрын
There is no need to mention it since it is included in the very definition of the cross product and of rotation: rotations never alter the magnitude of a vector. In fact, mentioning it would make the video more confusing and complicated. It is obvious why the decomposition is valid: it is a rotation. Again, that is essentially the definition of a rotation.
@angelmendez-rivera3516 жыл бұрын
Callidus 32 why would he? At no point in the video was it necessary nor would it have produced any data that was needed
@nikhilbagul71894 жыл бұрын
@@angelmendez-rivera351 Hey Angel, thanks for mentioning that albeit @Anchan is right here since it is implied and not expressed explicitly. It maybe straightforward for some but not for others. If we are here to see the proof then we expect a step by step derivation.
@xxxXLopesXxxx7 жыл бұрын
How can I find the value of ñ x v manually at 12:30?
@Math_oma7 жыл бұрын
+Pedro Lopes The way the cross product calculation is usually taught is by setting up a 3x3 matrix and finding the determinant: en.wikipedia.org/wiki/Cross_product#Matrix_notation
@mktsp25 ай бұрын
I think the direction of n^ x v is wrong. It should look the opposite direction. Am I right?
@matematica_do_zero5 жыл бұрын
Muito Bom!!! Obrigado!
@Khether00017 жыл бұрын
*man, thank you so much it does help a lot! thanks!* _hey, now... who still needs to master your anatomy... and animation... and painting... and coding... and fashion... and texturing/illumination/rendering?... and half a dozen softwares? and... still hear your game "suuuux"? and "whyyy is it taking sooo LOOOOOONG???"_ 😉
@ScienceDiscoverer7 жыл бұрын
I know this feel T___T Espassialy cos I try to create my game from scratch, without any premade engine, like all the weaklings do!
@vivekdabholkar59659 ай бұрын
Great job!
@MrChrisRab8 жыл бұрын
Will you also make a video on the classical and modified Rodriguez parameters? I think they both are much easier to play with when doing rotations.
@Math_oma8 жыл бұрын
+MrChrisRab I'm not familiar with those but when I stumble upon _parameters_ used in rotations, they often seem to be components of a quaternion in disguise. Is there something gained with these classical or modified Rodrigues parameters that isn't already there with quaternions?
@MrChrisRab8 жыл бұрын
Yes, quaternions are by far the most used, which sadness the people who have used CRPs or MRPs (Classical/Modified Rodriguez Parameters). Both CRPs and MRPs have an easy transformation from quaternions (also called Euler angles). They both are represented solely by three coordinates (instead of the four in quaternions), which allows us to do easy linear algebra on them as if they were dimensional vectors (but they don't represent a location in space, only a rotation!). CRPs and MRPs have useful properties when it comes to take the time derivative of the rotation (when seeking the angular rate): they both are effectively a matrix multiplied by the three coordinate representation of the parameter as a vector. One disadvantage of the CRP is that they become singular at rotations of +/-180 degrees. Similarly the MRPs go singular at +/- 360 degrees. However, in both cases we define the *RPs with their "shadow set" which tracks the same rotation but from the long way (i.e. instead of going from 350 degrees to 20 degrees via zero, it'll go from 350 to 20 backward). Another very big advantage in terms of application is that both the CRPs and MRPs have simple linearizations: the CRP is effectively the principal rotation vector multiplies by tan(theta/2), and the MRP is the same but by tan(theta/4). Pages 112-126 of "Analytical Mechanics of Space Systems" covers these parameters very well. And of course, I'm more than willing to talk a little bit about them.
@angelmendez-rivera3516 жыл бұрын
MrChrisRab There is objectively no advantage to be gained from the parameters that there is not to gain from quaternions. In fact, the parameters are technically derived from quaternion algebra.
@adityadas.mr.cosmos3576 жыл бұрын
Well taught
@ilafya4 жыл бұрын
Thank you You are the Man man
@gtagamer69623 жыл бұрын
Ohhh that made my day
@ΝικόλαοςΜελάς-π2γ8 жыл бұрын
perfect! well done
@OsamaAdel7 жыл бұрын
One thing I can't get very well is what that scalar part of a quaternion is for? what does it represent geometrically?
@Math_oma7 жыл бұрын
+Osama Adel Supposing the quaternion to be of unit length, the scalar part is the cosine of the half-angle in the rotation.
@OsamaAdel7 жыл бұрын
Ok(!!) .. but Why?!! I mean, quaternions are just like vectors but with their components disassembled and each component is multiplied by a unit vector of its corresponding axis - which is completely fine .. but then comes the scalar part spoiling my understanding .. I don't get why it is there ?
@Math_oma7 жыл бұрын
+Osama Adel But you should try to understand what the scalar is doing through the development of the algebra, not just examine the quaternion. What I said above follows from the way the rotation formula turns out as an exponential. For example, in this video (and in the accompanying video: general case) did you have any specific questions?
@marcushellstrom11577 жыл бұрын
If you've experienced applied physics, its a vector field (I reckon); a vecorial function with real output (this "just" involves an algebra aswell!
@angelmendez-rivera3516 жыл бұрын
Osama Adel It does not represent anything geometrically. Paravectors are very difficult to understand geometrically, and quaternions are just paravectors. They are not mere vectors. This is why in order for them to be geometrically useful, we let the scalar part be 0.
@nyfpos7 жыл бұрын
I afraid the result of example not to be correct in the formula. Because the length of vector v (1,-1,0) would not be 1. In the formula both of vectors n and v are unit vector, right?
@nyfpos7 жыл бұрын
The other question, is the length of v, v' and cross(n,v) be the same?
@nyfpos7 жыл бұрын
So the vector v (1, -1, 0) can not be normalized. And the formula still work?
@raphaelmillion7 жыл бұрын
v does not have to be unit length, because |v|=|n×v| as long as |n|=1
@Math_oma7 жыл бұрын
+Raphael Million Right. I've deleted my comments above because they were mistaken. The example seems to be fine in this video.
@angelmendez-rivera3516 жыл бұрын
No, in the formula, only n is a unit vector. v and v’ need not be unit vectors.
@jaffarmohiddin42586 жыл бұрын
Hi, please clarify, how v has same length as (n*v).
@Math_oma6 жыл бұрын
The length of n X v must be the amount of area contained in the parallelogram defined by the vectors n and v - that comes from what the cross product is. That parallelogram is a rectangle with side lengths 1 and |v| because n is of unit length and orthogonal to v, so n X v must be of length |v|.
@jaffarmohiddin42586 жыл бұрын
Thank you
@jaffarmohiddin42586 жыл бұрын
Hi, I have converted rodrigue vectorial form to matrix form but having one doubt. Can you derive this so that I can check where I have gone wrong. Please
@Khether00017 жыл бұрын
sigh... nope too theoretical now... still have to figure out in maxscript how to put all the bones into an array and mirror their rotations... but this went far too away... sigh... will keep trying though
@아지-d3r4 жыл бұрын
Thank you!
@Khether00017 жыл бұрын
so I need to write a script... using quaternions... to locally mirror the rotation the bones of my character in 3dsmax... so I can rig it properly... to do all the animations... that I'll use in my timeline in Unreal... so the character I've modeled... can show a proper behavior on his extensor carpi radialis longus... and have it not intersect the mesh when you are applying physics simulation of cloth and hair... ... ... *SIMPLE!*
@ScienceDiscoverer7 жыл бұрын
EZ
@DineshKumar-zw7vg4 жыл бұрын
If v and n hat passes through origin then they are not perpendicular. Then the rotation is not in a cone shaped plane, it's actually in a disc.
@DineshKumar-zw7vg4 жыл бұрын
Of course i am saying for the example part only.
@OlayRivera7 жыл бұрын
why ňxv=v' ?
@Math_oma7 жыл бұрын
+Olay Rivera If n and v are orthogonal (as in the video), with n serving as a normal vector to a plane, crossing the two, n x v, will produce a vector which is orthogonal to both n and v. Because it is orthogonal to n, this vector must be in that plane and because it's orthogonal to v, the new vector, v', will be rotated pi/2 radians with respect to v.
@StanislavBashkirtsev4 жыл бұрын
The drawing showed vxn instead of nxv..
@abhiroop1006 жыл бұрын
very well explained !!
@terrylarson71416 жыл бұрын
What would be the purpose of multiplying one 4-dimensional vector by another? For that matter why would one want to add two 4-dimensional vectors? The answer may lay in your other videos and it is my aim to watch them. But for the moment, I have to go mop up my brain off the floor since it just exploded.
@allmycircuits88506 жыл бұрын
Don't be too ashamed: Hamilton himself tried to come up with 3-dimensional equivalent of complex numbers to represent 3D rotations. He was struggling for 10 years before he finally came up with idea of quaternions! Later it was proved that 'complex' numbers with 2 imaginary parts cannot succeed in this task, no matter how you define multiplication rules. I still don't know exactly intuitive proof of this fact, the shortest proof uses the fact that any 3x3 matrix will always have at least one real eigenvalue, which means there is always degenerate case when multiplication of 2 non-zero 'complex' numbers results in zero. Not good for rotations, because you want multiplication to be always reversible (if you rotated some object, you can always rotate it back!) which is not the case here. Another reason is hairy ball theorem. Turns out, there is no good way to describe rotations using just 3 numbers. There always will be some points where rotation with finite velocity requires infinitely fast change in one of variables you use to describe rotation. For example, when using azimuth and elevation and going exactly through zenith (90 degree elevation), azimuth changes abruptly from 0 to 180. What's more, there is ambiguity in azimuth when in elevation = 90. So 3 numbers are too little, but 4 numbers are OK and that's what quaternions are.
@angelmendez-rivera3516 жыл бұрын
Terry Larson This fact I will tell you is counterintuitive, but true nonetheless. The fact is that in order to perform rotations and scales geometrically in 3 dimensions, you require a 4-dimensional algebra, which is why we use quaternions. Similarly, if you wanted to describe geometric manipulations in 4 dimensions, you need an algebra with 8 dimensions, which is where octonions come in. In general, dealing with Euclidean geometry in N-dimensions requires an algebra with 2^(N-1) dimensions. There is no 0-dimensional geometry, but 1-dimensional geometry obviously only needs the real numbers, which is algebra in 1 dimensions, and 2 dimensions requires an algebra with 2 dimensions because it so happens that N = 2^(N-1) has solutions N = 1 and N = 2.
@michaelstark28322 жыл бұрын
@@angelmendez-rivera351 These are not 4-dimensional vectors. Quaternions are mathematical objects with a scalar part(in this case,the cos of half the angle of desired rotation),and a 3 dimensional vector part.
@brendawilliams80624 жыл бұрын
Thankyou.
@thecelt48072 жыл бұрын
give me a real life scenario where this understanding of such will apply to a situational use of the understanding other than out in orbit