How quaternions produce 3D rotation

Поділитися
Вставка
  • Опубліковано 22 тра 2024
  • Wait a minute, aren't quaternions super confusing? After all, they live in 4D space!!! Let's try to put this confusion to rest.
    Watch 3Blue1Brown's excellent video on quaternions:
    • Visualizing quaternion...
    Play with quaternions on 3Blue1Brown's and Ben Eater's interactive website:
    3imaginary1real.com

КОМЕНТАРІ • 123

  • @ebolapie
    @ebolapie 3 роки тому +212

    obviously they produce rotation because they're called qua-TURN-ions duh

    • @ARBB1
      @ARBB1 3 роки тому

      lol

    • @sagatparkes
      @sagatparkes 2 роки тому

      bravo, top comment

    • @cosmicAK
      @cosmicAK 2 роки тому

      Crazzzyyyyt

    • @ytcommentsguy
      @ytcommentsguy 2 роки тому

      this comment is gold

    • @joshl.8950
      @joshl.8950 Рік тому

      I thought it was because you could use them to model an 🧅

  • @swift4593
    @swift4593 2 роки тому +62

    I love this explanation! I watched 3blue1brown’s video first, but I still had a lot of questions. This video cleared most of those questions for me

    • @TheRojo387
      @TheRojo387 Рік тому +1

      Assume the result and the initial vector are unit vectors; q encodes angle by a real part much like a dot product = the cosine of half the angle between them, and that AND axis by quaternion parts basically a cross product with a magnitude of the sine of half the angle between them.
      This makes quaternions very powerful for 3D rotations.

    • @fcolecumberri
      @fcolecumberri 6 місяців тому +1

      3blue1brown's video was quite confusing (and I already knew about them), this was much more easier to understand.

  • @jamesking2439
    @jamesking2439 2 роки тому +6

    I finally understand why the double rotation happens and why you need the two sided multiplication to fix it. Thank you for this explanation!

  • @PrayAlways-mn7wh
    @PrayAlways-mn7wh 3 місяці тому +5

    Great job and this is by far the best description of a quaternion video I have come across. One comment I have is that "by definition" contains no information why things are they way they, there is no insight or intuitive feel for the description of "they way things are the way they are". "By definition" often is stated by the teacher to the student, to mean do not ask anymore questions rather than giving insight. "By definition" should be explained in context, and often it means "logically consistent" or it leads to a "illogically consistent" result, in both cases the "logically consistent" and "illogically consistent" result should be explained. For quanternions, the "by definition" implies a logically consistent subfield of numbers given all pertinent rules are stated and followed. This is why Rowan Hamilton was excited and immediately scratched down the formula i^2=j^2=k^2=i*j*k=-1, he had in essence discovered a new field (to be more accurate a new subfield) of numbers, a new space, which is logically consistent given the stated quaternion rules of multiplication. The focus shouldn't be on "by definition" but the fact that Rowan Hamilton had discovered a new subfield of numbers which was only appreciated once computers and computer games became popular. To see the iIlogical consistency, one can attempt to create a field or subfield with i and j only, if you attempt to do this you will quickly find there is illogical consistencies within a 3 dimensional world and one has to go to 4 dimensions (quaternions) with some extra multiplication rules to make a consistent subfield.

  • @oystercatcher943
    @oystercatcher943 3 роки тому +41

    This is by far the BEST description I’ve seen of quarternions brilliantly explaining both the maths and practical side of 3D rotations!

  • @felipeceler
    @felipeceler 3 роки тому +35

    Best explanation so far. Thank you for sharing it !

  • @justvinchy8776
    @justvinchy8776 3 роки тому +21

    Wow! I didn't imagine someone could explain is as good as you did. Great job.

  • @maxwellchiu9934
    @maxwellchiu9934 2 роки тому +1

    Been looking at quaternions for a year . This is the best source so far. Much appeciated.

  • @user-fr9py6fe6q
    @user-fr9py6fe6q 5 місяців тому

    By far the BEST description after wandering all the materials.. Thanks !!

  • @Tantandev
    @Tantandev 3 роки тому +6

    The animations are next level!

  • @benjaminreynolds5733
    @benjaminreynolds5733 2 роки тому +3

    I just found this channel and I am so happy that I did. Can’t wait to see more videos to come from this channel and hope it will be recognized by the rest of the mathematics community on UA-cam.

  • @marcobrini
    @marcobrini 2 роки тому +1

    Extremely well explained! Bravo.

  • @darkexior
    @darkexior 3 роки тому +4

    Best video explaining quaternion rotation

  • @goli292009
    @goli292009 2 роки тому +5

    I loved the video. Hamilton is one of my favorite mathematicians and I really love to talk about him. Quaternions are one of the mathematical concepts invented long time ago which have been used recently. One of the infinite many examples that answers the question "where I will be using this stuff" in math classes. Now, I can give a more clear description about how quaternions are used in animations. Thanks a lot. I sincerely appropriate it.

  • @Meanderingthinker
    @Meanderingthinker 3 роки тому

    great video, I've been trying to learn quaternions and get my head around it for a while, your video really helped

  • @alexmassy
    @alexmassy 7 місяців тому

    Pure concentration of mindblowing explanation ! Thx

  • @inrr2318
    @inrr2318 Рік тому

    I've had trouble understanding it but your video help me a lot . Great work , thank you

  • @paralol_
    @paralol_ 3 місяці тому

    This was super clear and super fun! It really helped me understand it better, thanks a lot!

  • @movingheadmau8128
    @movingheadmau8128 2 роки тому +5

    That was an amazing explanation, thank you for sharing! :)
    The last part is what flashed me the most. I use quaternions for animation and rotation handling in Unity-Engine and I thought that a quaternion would only be non unique when using a rotation angle which is theta + k*360° where the sin and cos would yield the same results. I had never thought or heard of the fact that there is in fact a way to encode the "long" and the "short" way from one rotation towards another. My assumption was that quaternions would just always yield the shortest rotation. :D

  • @billpengelly7048
    @billpengelly7048 11 місяців тому +1

    Weird how it’s almost like the algorithm can read my mind. I’ve been thinking about rotation and higher dimensional space. And then I get recommended a video about quaternions and rotation. 😮

  • @tw5718
    @tw5718 Рік тому

    Very nice. This had all the info I was looking for.

  • @RegorForgot
    @RegorForgot 3 роки тому +3

    you need more subs! this was hilarious and informative!

  • @npathegenius5733
    @npathegenius5733 3 роки тому +1

    I am amazed at how clearly you pointed out the little details of the multiplications and rotations, I learned quite a bit usage wise. Absolutely well done. Do you have a discord account? I would love to talk to you about quaternions and other mathematics sometime!

  • @noahblaine1901
    @noahblaine1901 Рік тому +1

    I am not sure who this is for. This explanation was quick and dirty and assume a very good understanding of math lingo.

    • @hermit1428
      @hermit1428 Рік тому

      if you have some basic knowledge about 3D vector and Euler's formula, you should understand most of the video

  • @markmisin
    @markmisin 2 роки тому

    An amazing explanation!

  • @ingiford175
    @ingiford175 2 роки тому

    The why asked around 3:50ish is because it is defined that way, and that definition satisfies that the definition forms a Group, which gives it many properties we can use since it is a group.

  • @MGTOW-nn9ls
    @MGTOW-nn9ls Рік тому

    This video is outstanding. The best explanation of this tricky material. Sir, you are low profile genius. Thank you,

  • @_general_error
    @_general_error 6 місяців тому

    I can see now, that quaternion operations remind me on how charges move in the electromagnetic field. A "moving" charge will produce a circular magnetic field (It's "charge under acceleration produces a circular magnetic field with it's plane oriented perpendicular to the direction of acceleration)...

  • @fidhalkotta
    @fidhalkotta Рік тому

    Fantastic video

  • @kartikeyadubey9211
    @kartikeyadubey9211 7 місяців тому

    Thank you for making this!!! I just learnt about quaternion rotations in class and unfortunately my prof couldn't go into great details (time constraints) about how the rotations are produced.

  • @indranildas9565
    @indranildas9565 10 місяців тому

    This was soooo good. Thanks

  • @indepen
    @indepen Рік тому

    You save me a lot! I just struggle to quaternion but can't understand. thank you so much and thank penguin!

  • @miinyoo
    @miinyoo 2 роки тому

    Simply adorable.

  • @3zdayz
    @3zdayz 3 роки тому +5

    I'm not sure that it matters if you can understand how quaternions 'work' themselves. They are just a math representation of axis and angle, matrices can also be computed from just axis and angle. Turns out if you don't split axis and angle you get (angleZ,angleY,angleZ) which is just a 3D thing. Rotations are 3 dimensional, even though Quaternions have 4 independent parts, to actually represent rotations they have constraints on their possible values. Consider you can represent velocity as speed*direction, angular velocity is angle * direction (angle * axis). And it turns out that vectors in the 3d rotation space have a direction that is the same as the rotation axis and their length determines how much rotation is applied around that axis.
    ... but maybe that's too abstract, rotations are represented with a gyroscope always. The axis of the gyroscope is the axis of rotation, and the angular offset of the rotor is the angle around that axis. All rotation formulas went back to angle and axis, and after some persistence, I now have actually just angle-angle-angle rotations github.com/d3x0r/STFRPhysics , which is just the basic 3 dimensions for rotation. If I took and separated everything into speed*direction instead of velocity, basic motion in 3d space would also appear as a 4d vector.... but really it's just a 4d projection of the basic 3d system.
    ua-cam.com/video/0Y7fmMtlm3Q/v-deo.html
    Quaternions actually fail - (1) you can't recover from the cos(theta/2) the actual rotation angle, but only +/- pi.... also near 0, the sin(theta) * axis you lose the actual axis components of rotation - same at 180 (well, 360 since it's theta/2) ...

    • @JasonCunliffe
      @JasonCunliffe 3 роки тому

      wow = Really intreresting reply. Thanks!

  • @yolotaylor993
    @yolotaylor993 4 місяці тому

    so interesting viedo, vivid and explicit

  • @pavelperina7629
    @pavelperina7629 Рік тому +2

    This is pretty good. My best understanding so far was somewhat halfway between geometry algebra rotors and quaternions. Like let's rename vector space to i,j,k or e1, e2, e3. Now let's define piecewise multiplication which says that vectors i,j,k are multiplied by right-hand rule (i*j=k), but when they are multiplied by themselves, they become -1. Now use that sandwich multiplication that rotates vector by angle and adds scalar to it and then rotates it again and removes that scalar. In simple cases rotation is halfway and scalar is not produced.
    By the way quaternion interpolation is NOT so easy as advertised. It's same like with complex numbers: multiplying by complex number gives you rotation. Oh, by the way ... if that complex number is on unit circle, otherwise it scales everything too. If you interpolate between two numbers on unit circle/sphere, you get closer to center and they downscale everything. Obvious solution is to normalize interpolated complex number. Hell, we have two problems now - how to normalize it when it passes through zero (interpolating rotation by 180 degrees gives us singularity just like Euler angles) and second problem is that as it gets closer to zero, angular speed increases. In the end, solution to interpolation between two orientations is to use two quaternions to find axis and angle and to interpolate that angle (SLERP - spherical linear interpolation). Then it's questionable if we want to construct quaternion or matrix, because multiplying thousands of vector by a matrix is cheaper operation.
    But there are some nice uses for quaternions, such as storing orientation efficiently, finding vector and angle between two, generating random orientation, likely more complex smooth interpolation without sudden changes of angular velocity at control points.

    • @NXTangl
      @NXTangl 11 місяців тому

      You could always precompute the matrix from the quaternion by applying the transformation to each basis vector...

  • @krei-se
    @krei-se Рік тому

    Thanks for the great video! I really missed a clear math background on this in the interactive videos and wikipedia is not nearly as clear as your descriptions!

  • @mitrafathianpour1987
    @mitrafathianpour1987 2 роки тому +1

    Thank you so much.. it was useful for me because my thesis is related to this subject and I am really interested in Quaternions because it has special role in our life.

    • @coolfungirl8277
      @coolfungirl8277 2 роки тому

      me too. specifically quaternion phi spiral.

  • @0x90meansnop8
    @0x90meansnop8 Рік тому

    Bro, I watched a lot of stuff online for quaternions, but really nobody - and I mean nobody I've encountered - ever explain how to actually rotate things with that.
    Yeah sure, there are some good explanations what quaternions really are and stuff like that, but not a single example on how to do it. Up until this moment I thought quaternionrotation happens only by multiplying a pure quaternion by a rotation quaternion and wondered why my results are so dumb.
    You made it click for me and I want to thank you a lot for that.
    Or how a german would say it: "Der Groschen ist gefallen."
    Have a nice day.

  • @tanchienhao
    @tanchienhao 2 роки тому

    amazing video!

  • @huajinmsl
    @huajinmsl 2 роки тому

    this is the best explaination for quaternions👍

  •  2 роки тому

    Hi I would like to know from what where did you learn about the concept at 7:17. Great video btw!

  • @2fifty533
    @2fifty533 8 місяців тому

    3:41 well actually, there _is_ a reason why these rules are true, and you can find this when you replace quaternions with rotors
    quaternions are basically obfuscated rotors, and with rotors you can derive stuff a lot more naturally

  • @smizmar8
    @smizmar8 Рік тому

    "...basically pulled them out of a hat" ..love it 😂

  • @keypo790
    @keypo790 10 місяців тому

    3:53 discovery of that formula ijk = -1 is discovered how, is shown by Jeff Suzuki youtube channel titled " Hamilton and the Quaternions"

  • @randysonnicksen9475
    @randysonnicksen9475 3 роки тому +3

    I had to watch this many times but I finally get the whole qvq-1 idea and why we use half the rotation angle. Still mind bending but this helped tremendously. But now I'm struggling to understand how to use this to track my aircrafts orientation. In this video he rotates a vector v using q and q-1. But how do I express a bodies orientation initially with a quaternion that includes all the information (yaw, pitch, roll) of the aircraft. The vector ijk components in v only represent yaw and pitch, but not how the body is rolled. If I start with v = 1,0i,0j,0k which is the quaternion orientation corresponding to yaw, pitch, roll = 0,0,0 then when I left multiply by the rotation matrix q and right multiply by q* or q^-1 the orientation doesn't change. When I only left multiply by q, the orientation seems to move correctly for small angles (pitch and roll < 90 deg)

    • @jamesking2439
      @jamesking2439 2 роки тому

      The qvq* formula is only for applying rotations to vectors of the form xi + yj + zk. To apply one rotation to a other rotation, you just use q2 * q1.

    • @angeldude101
      @angeldude101 2 роки тому

      A rotation doesn't care which direction it's facing as long as it stays within the same plane. If you try to rotate a rotation, then trying to apply the rotation would just snap it back to whatever you're rotating. Composing rotations is distinct from rotating the rotation.

  • @chilinouillesdepommesdeter819
    @chilinouillesdepommesdeter819 3 роки тому

    PenguinMaths,I found your vulkan-diagrams repo recently,and those diagrams are so great,could tell me what software you use to make them?

    • @PenguinMaths
      @PenguinMaths  3 роки тому +1

      Thanks! I use inkscape to make the diagrams

  • @mueezadam8438
    @mueezadam8438 3 роки тому +6

    7:05 made me giggle

  • @AndyOpaleckych
    @AndyOpaleckych 2 роки тому +1

    This video is awesome. Very nice explanation and funny jokes.
    When penguin pulled out the second pair of 3D glasses I audibly laughed.
    Thank you :)
    PS: I'm just a little disappointed about the flip joke... I hoped he would unfold like the hypersphere in 3B1B video and fold back in. That would be a true 4D flip

  • @silverlining6824
    @silverlining6824 3 роки тому +2

    All lectures on quarternions are given by mathematicians, via complex numbers. Maybe the following practical application will motivate the need.
    Rotations in 3D can be expressed in terms of two angles, theta and phi. One of them lies in the plane formed by two of the orthogonal axes, say X and Y; and the other in the plane involving the third axis, say X and Z. Any 3D rotation can be expressed as sine and cosine of theta and phi.
    So, what is the problem? Why are the quarternions useful? Trigonometric functions such as sine are computed as infinite series. (Look up Taylor Expansion for the Sine and Cosine functions). Exact solution involves infinitely many terms. Bit real time gaming demands fast computation. Yet, truncation of a series as approximation necessarily involves errors. So what is one to do?
    This is where quarternions come in; they involve only dot and cross products of real numbers - very fast and at the same time exact and precise.
    Now, are you motivated to follow this or any other presentation on quarternions?

  • @keeponspiral7572
    @keeponspiral7572 3 роки тому +1

    nicely done helped btw

  • @windowsxseven
    @windowsxseven 2 роки тому

    swear to god every time the penguin comes up i can't help but ball my fist

  • @librarymn7251
    @librarymn7251 2 роки тому

    Amazing...

  • @kongolandwalker
    @kongolandwalker Рік тому

    Much better for a noob than 3b1b spheres, but i still don't understand fully. Some parts of the explanation felt like jumps, in the second part of the video.

  • @harjoat
    @harjoat 2 роки тому

    thanks king

  • @SuperDeadparrot
    @SuperDeadparrot 11 місяців тому

    When using quarternions with complex coefficients, does complex i commute with quarternion i,j,k or not?

  • @hyunjoebrother
    @hyunjoebrother 2 роки тому

    Hey I just watch this video by our University's Professor's Computer Graphics Lecture
    Penguin Voice is VERY Awesome lol

  • @ww8720
    @ww8720 3 роки тому

    if the intended quaternion (q ) is (1,0,0,0) but I get q1=(0.328,-0.395,0.575,-0.6337) instead, how do I rotate q1 to get to q?

  • @angeldude101
    @angeldude101 2 роки тому +2

    Something interesting happens when you rename the unit quanternions a little bit: xy, yz, and xz. But if those were just formed by normal multiplication, then it looks almost like it could've been the cross-product, which is antisymmetric and would suggest that yx, zy, and zx also exist and are the negatives of the first three. So xy^2 = xyxy = -xxyy = -1... huh. and xyyz = xz... hmm...
    Perhaps the quaternion products are more fundamental than you claim here when you suggest that they were just defined this way. (I did gloss over xx = 1 etc. There's a lot more going on here that is _really_ interesting. Among other things, it _does_ become obvious that these become a rotation considering xy can be read as the rotation the brings x to y.)

  • @masturdOfTheUniverse
    @masturdOfTheUniverse 3 роки тому

    Where is -1 on the number line located? Is it at infinity?

  • @mj2carlsbad
    @mj2carlsbad 2 роки тому

    So basically point in a direction with a 3d vector then rotate around it by theta degrees?

  • @tedsheridan8725
    @tedsheridan8725 11 місяців тому

    Cool video. But your diagrams at 10:18 on aren't making sense to me. Are the pi's supposed to be radian values of the rotator in quaternion space? or the actual values of the physical rotation? Either way, they don't correspond to the rotation of the igloo in either direction.

  • @keypo790
    @keypo790 10 місяців тому

    4:50 rotation should be counter-clockwise when talking about right-multiple of (-i)

  • @adolforosado
    @adolforosado 2 роки тому

    If you like Quaternions, you may want to give the video I posted a look and a comment. Not mine, Credit where it's due.

  • @randysonnicksen9475
    @randysonnicksen9475 3 роки тому

    So I went through the tedious exercise of expanding out qp = (A + Bi + Cj + Dk)(a + bi + cj + dk) and then right multiplying the result with the conjugate of q (q*) which is A - Bi - Cj - Dk) and after simplifying, each of the coefficients of the imaginary vector terms are products of the initial orientation (p)'s imaginary terms b, c and d. Therefore, if the initial orientation is aligned with the reference frame (1,0,0,0) the resulting final orientation after any rotation by q (left multiply by q, then right multiply by q*) has imaginary terms which are all zero. Why doesn't rotation work for the initial orientation of 1,0,0,0???
    The result of qpq* with q and p defined as above is:
    a(AA + BB + CC + DD)
    + i [ b(AA + BB - CC - DD) + 2c(BC - AD) + 2d(AD + BD)]
    +j [ 2b(AD+BC) + c(AA - BB + CC - DD) + 2d(CD - AB)]
    +k [2b(BD - AC) + 2c(AB + CD) + d(AA - BB - CC + DD)]
    You can see that the coefficients of the resulting imaginary terms (i, j, k) are all the result of products of the initial orientation vector coefficients (b, c and d). What am I missing here? I thought that if I started with an initial orientation aligned with my reference frame, and then performed a rotation on that orientation, I would get a result which represents the final orientation.
    Is this a special case (1,0,0,0) where the rotation formula doesn't work? That doesn't sound likely because it would mean the quaternion method would have it's own form of "gimbal lock". Can someone explain this??

    • @PenguinMaths
      @PenguinMaths  3 роки тому +1

      Remember that v needs to be a pure quaternion, ie the real part should be 0 (6:26). Because we are only rotating a 3D vector which we specify as the vector part of v (what you have named p). Since you have specified the whole vector part of p as the zero vector, after rotation it remains the zero vector which is what you noticed by observing 'a' doesn't show up in the expressions for the coefficients of i, j, or k. Also good for you for working this out, this is how you learn!

    • @randysonnicksen9475
      @randysonnicksen9475 3 роки тому

      @@PenguinMaths Thanks for the reply. So I'm using this for a flight controller. I need to define an initial orientation from which I can begin performing rotations. How do I express an initial orientation that will work with quaternion multiplication? How do I express yaw = 0, roll = 0 pitch=0 in an orientation quaternion. If I plug these numbers into an Euler to Quaternion formula I get 1,0i,0j,0k .
      And If I'm to use a "pure quaternion", how can that fully define the orientation of my aircraft. It tells the direction I'm pointed, but doesn't tell anything about how it is rotated about that vector.
      If the real coefficient is 0, that implies that cos(theta/2) = 0 so theta = 180 degrees. So If I define my reference frame as i=North, j = West and k = up, and I start my aircraft level and pointing north, how do I express this as a quaternion? Would I say 0, 0i, 0j, -k (negative k because the 0 real part implies I'm rotated 180 degrees around the k vector? Do you see my quandry here? Maybe I'm mis-applying quaternions, because I thought they could be used to fully define the orientation, but if that first orientation doesn't include information about the rotation around the vector, it doesn't fully define the aircraft orientation.

    • @PenguinMaths
      @PenguinMaths  3 роки тому

      @@randysonnicksen9475 I have only used quaternions for rotations in 3D graphics and don't have experience with robotics so I can't speak much to that. But I think you're confusing the roles of the quaternions q and v. When you plug in 0 to the Euler to quaternion calculator you get 1 + 0i + 0j + 0k = 1 since this is a rotation of 0 degrees, aka doing nothing. This is the q quaternion, not v which you're treating it as. So in this case qvq* = 1*v*1 = v so then v is rotated by 0 degrees. And the orientation also is specified by q, not v, which I think is where your confusion is coming from. It's assumed you already have three basis vectors e1, e2, e3 which is your starting orientation. Then you can specify any orientation with the quaternion q, which can transform your basis vectors to qe1q*, qe2q*, qe3q*, which is your original basis vectors rotated to a new orientation.
      So it's entirely the q quaternion that specifies an orientation and it's the v quaternion that is being rotated to that orientation. So in a sense, every atom of your craft is being represented by it's own quaternion v which specifies the 3D location of that atom from the origin. You could say its starting orientation is specified by the quaternion q_0=1, the "default" orientation. Then you can specify any other orientation with q, which means that for every atom v of the craft, it's new position for that orientation is given by qvq*. In computer graphics this is true except replace the word 'atom' with 'vertex'.

    • @randysonnicksen9475
      @randysonnicksen9475 3 роки тому +1

      @@PenguinMaths I think you've nailed it. I was thinking that a quaternion could fully represent the 3D orientation, but no, it only represents a rotation of a point (or 3D vector) to a new point or vector. Just prior to reading your reply I had the idea to use quaternions to track TWO vectors, say the UP vector, and the NORTH vector in 3D space. Any two orthogonal vectors fully define a coordinate system (the 3rd dimension is defined by the normal to the plane defined by the two orthogonal vectors.) While it's not quite as elegant as I was hoping (one calculation), it is still quite efficient to multiply 2 vectors by q and q* to determine the new orientation. I'll still need to figure out how to convert the results into an orientation with respect to the global inertia reference frame, but that should be a simpler problem.
      I did run across a paper which indicated that it's easiest to do all (quaternion) calcs with reference to the body frame because the gyroscope sensors are attached to the body. It's easier to track the rotation of the earth around the body than to track the body with respect to the earth frame. This same paper also suggested that I could treat the 3 separate gyro readings (x,y,z) as a vector with magnitude sqrt(xx+yy+zz) and do a single rotation instead of rotating around each axis separately. (cool).
      AND - using a 3D magnetometer and 3D accelerometer, I can get the vectors for magnetic north, and up to "calibrate" my initial conditions, and correct for drift due to offsets in the gyro readings. Thanks for taking the time to read and respond, and to clarify how I was mis-applying the quaternion "v". Much appreciated.

    • @randysonnicksen9475
      @randysonnicksen9475 3 роки тому +8

      I did some more research and found the answer I was looking for. In this article www.samba.org/tridge/UAV/madgwick_internal_report.pdf Madgwick explains that two rotation quaternions can be combined with simple multiplication, and the result is a single rotation quaternion which expresses the orientation of a body (frame) with respect to some other frame (say the earth frame). So in this way, the rotation quaternion IS a complete definition of a bodies orientation, whereas the single pure vector is not. Furthermore, we don't need to track two or three vectors to fully define the new orientation. Additionally, we don't need to do a double multiplication qv and (qv)q-1 because the quaternion q contains all the information I need. So if the earth frame is represented as 1,0,0,0 (no rotation), then the orientation of a rotated body is simply the product of all individual sequential rotations multiplied together. This explains what I saw in my arduino program where if I multipled 1,0,0,0 by q only, and not (qv)q-1, I got a result that looked like a valid orientation. I feel like a lot of the information (videos and papers) out there fail to point this out and I feel it is a really important feature of quaternions.
      BTW, I don't need a reply, but I wanted to post this so that others who are looking for the same information can discover what I did with maybe a little less pain.

  • @andrewfrolov5144
    @andrewfrolov5144 Рік тому

    How do you do that voice for penguin character? Is it a bot a real person narrating?

  • @deepakbamania7945
    @deepakbamania7945 Рік тому +1

    what is right and left multiply?
    sorry for asking such a basic question

    • @PenguinMaths
      @PenguinMaths  Рік тому +2

      You might be used to multiplication with real numbers which are commutative, which means the answer is the same even if you change the order of the operands. eg 4 * 5 = 20 and 5 * 4 = 20. This is not true though of quaternion multiplication. If q1 and q2 are quaternions then q1*q2 is not always equal to q2*q1. In the first case we say that we left multiply by q1 and the second case we right multiply by q1. To describe this property we say that quaternion multiplication is not commutative.

  • @maxwellchiu9934
    @maxwellchiu9934 2 роки тому

    Watched this video many times. Only thing I can't figure out is why Cos and Sine are designated on non-traditional axis (see 8:20). If anybody is still monitoring these comments, I would love an explanation. I would have flipped Cos and Sine. Otherwise, best explanation out there!!!

    • @maxwellchiu9934
      @maxwellchiu9934 2 роки тому

      Never mind. I just figured it out. It says so in video that unit vector just needs to be orthogonal.

  • @tobuslieven
    @tobuslieven Рік тому

    The multiplication rules exist because we're saying, "If there was a system that obeyed these rules, what would its behaviours be?" Then we find out those behaviours are really useful.

  • @sanketvaria9734
    @sanketvaria9734 3 роки тому +2

    This is hard as hell

  • @Navhkrin
    @Navhkrin 3 роки тому

    I didnt know you guys had a mind reading penguin at home

  • @N7Tonik
    @N7Tonik 2 роки тому +1

    I think the circle at 4:50 should point to the opposite direction like from j --> k and not k --> j

  • @AbrahamGarcia-bo3rk
    @AbrahamGarcia-bo3rk Місяць тому +1

    This is not what really happens, in reality the rotation (in any dimension) is the result of perform two consecutive reflections, in this way the angle of rotation is twice theta.
    and actually in any form of mathematics where you can represent points and reflections you can also represent rotations, for example with complex numbers, matrices, quaternions, etc.
    Sorry for my bad english

  • @ian731
    @ian731 2 роки тому

    I liked the video and the penguin, bring them both if possible kk

  • @keypo790
    @keypo790 10 місяців тому

    So Mr Hamilton basically invented(i dont know maybe discover a rules) quaternions that describes the rotation(

  • @theultimatereductionist7592
    @theultimatereductionist7592 2 роки тому

    For complex numbers, z, and given positive integer, n, there exist finitely many z in C such that z^n=1.
    But, there exist uncountably infinitely many quarternions, q, in Q, such that q^n=1.
    I had the paper proving this. Short proof. Essentially, Q having dimension 4 over the reals, having 2 extra free real parameters, is what gives us uncountably infinitely many solutions.

  • @gmendozafiee
    @gmendozafiee 3 роки тому +1

    i still dont understant, why you said "same two circle" on 4:09min, i only see one circle and one line, why 2 circle?

    • @hush_dxl
      @hush_dxl 2 роки тому

      the second circle is the line itself: the first circle is in the ijk space, the second one is related with the *real* axis. watch 7:19 for reference

  • @Spiegelradtransformation
    @Spiegelradtransformation 5 місяців тому

    This is by definition. What is in mechanic ?

  • @XYZ_youtube
    @XYZ_youtube 2 місяці тому +1

    5:50 k!, k factorial xD

  • @TheRojo387
    @TheRojo387 Рік тому

    Multiplying two pure quaternions is the equivalent of deriving two vectors' dot product AND cross product in one fell swoop. Well, almost; quaternion multiplication produces the NEGATION of the vector equivalent dot product.

  • @alexmc477
    @alexmc477 3 роки тому +1

    Holy shit it just clicked

  • @trolleymouse
    @trolleymouse 8 місяців тому

    Best explanation I've found and I still don't get it.

  • @ZMacZ
    @ZMacZ Рік тому

    7:05 Funny..

  • @thomasolson7447
    @thomasolson7447 Рік тому

    My avatar and banner are quaternions in 3d.

  • @GuilherHast
    @GuilherHast 3 роки тому

    É o pingo

  • @bios546
    @bios546 3 роки тому

    +1 if you've got navigation test tomorrow

  • @liubai01
    @liubai01 2 роки тому

    I am a penguin

  • @GitBits
    @GitBits Рік тому

    Very instructive, thank you. However, your statement at 3:43 "We define the rules of quaternion multiplication" on a background of 9 equations, is a bit misleading. Yes, the rules of quaternion multiplication are defined (They were defined by Hamilton), but they consist of 4 equations, not 9 :
    i2 = j2 = k2 = ijk = -1
    The other equations that you present are of course helpful for actually carrying out the calculations, but they should be understood as being derived from Hamilton's 4 original equations (above). For details on how to do these derivations, see
    ua-cam.com/video/jlskQDR8-bY/v-deo.html

  • @MiljanBojovic
    @MiljanBojovic 2 роки тому +1

    Quaternion, Quarter of an Onion , cut a quarter of the onion and you can see the rings of the onion as rotation and the tunic being the "i" which is like a Forward vector.
    Jokes apart. Quaternions are a similar concept on how you define magnetic field in a conductor passed by electrical current.

  • @brettalizer3271
    @brettalizer3271 8 місяців тому

    I'm too stupid to understand any of this I just wanna make cool animations but I guess ill never understand how it all works that's gonna annoy me no end but I guess you can win them all

  • @aashsyed1277
    @aashsyed1277 2 роки тому

    2d**

  • @olatunjifelix2102
    @olatunjifelix2102 3 роки тому +1

    i dont understand anything from all these

  • @phillawreviewer7668
    @phillawreviewer7668 3 роки тому

    Quaternions explained.

  • @Tannz0rz
    @Tannz0rz 10 місяців тому

    Not a single mention of geometric algebra; disappointing.

  • @specificocean588
    @specificocean588 11 місяців тому

    I guess ill be the first to say that made no sense

  • @Ajay-ib1xk
    @Ajay-ib1xk 11 місяців тому

    useless explaination

  • @sollybrown8217
    @sollybrown8217 7 місяців тому

    Plz drop the annoying penguin