Quaternions and 3d rotation, explained interactively
Вставка
- Опубліковано 10 тра 2024
- Go experience the explorable videos: eater.net/quaternions
Ben Eater's channel: / eaterbc
Help fund future projects: / 3blue1brown
An equally valuable form of support is to simply share some of the videos.
Special thanks to these supporters: 3b1b.co/quaternion-explorable-...
Previous video on Quaternions:
• Visualizing quaternion...
Nice explanation of Gimbal Lock:
• Euler (gimbal lock) Ex...
Great videos comparing Euler angles and quaternions, from the perspective of an animator:
• Humane Rigging 03 - 3D...
• Humane Rigging 03 - 3D...
Music by Vincent Rubinetti:
vincerubinetti.bandcamp.com/a...
------------------
3blue1brown is a channel about animating math, in all senses of the word animate. And you know the drill with UA-cam, if you want to stay posted on new videos, subscribe: 3b1b.co/subscribe
Various social media stuffs:
Website: www.3blue1brown.com
Twitter: / 3blue1brown
Reddit: / 3blue1brown
Instagram: / 3blue1brown_animations
Patreon: / 3blue1brown
Facebook: / 3blue1brown
I am a software engineer at a rocket company. There was a bug discovered in the code having to deal with interpreting rocket orientation in some simulation code originating from a mistake in the quaternion math. Despite having a physics degree, I was not at all familiar with quaternions so I turned to the internet for guidance. Your videos on quaternions helped me understand them enough to discover the mathematics mistakes and derive the correct formulae. Just thought you'd like to know this video helped launch rockets :)
I'm a software engineer in aerospace too. Coming back to this video of his because now they want me working with quaternions. I definitely recommend the interactive version of these videos for anyone really trying to learn quaternions.
I am also a rocket in software engineering and this work has helped a lot with my video,nuclear weapons work with me and it was help
@@peanies948 you are a rocket who can use the Internet and nukes work with you? Sounds like GBSD is going to have some real cutting edge AI ( ͡~ ͜ʖ ͡°)
@@JKTCGMV13 ahh my pocket is full of banana seeds
@@peanies948 i am also a engineer in rocket aerospace too, and I need your help. send nukes
I don't say this lightly: Your videos and especially these interactive videos will pioneer the future of education.
I'm often disappointed in our school system ( here in germany but probably applies for other countries as well).
Schools don't use the potential of modern media thereby being inefficent and wasting the stundent's time and undermine their curiousity. As a teacher I try to work against that but get caught in the same fatigue rather often. But being confronted with new topics this way I become like a child again in the best sense : I'm curious and full of wonder. And it's fun to learn something new. I have regained hope that school can be like that most of the time for future generations of students.
I fully agree. Since my school is closed cause of Corona I'm studying by using things like this (often instead of my homework). I have the feeling that i'm learning much more than I would normally do during school. I'm almost sad that next week I have to go to school again and become forced to boredom instead of using my curiosity to learn new things.
Its wonderful that you as a teacher is doing this. Teachers who are daring enough to try something new and not care about their paycheck all the fucking time is godfind, but I can only hope more teachers get into education with that mindset
seem like limit of thing that are less than
australian living and working in germany: i'm always amazed and incredibly jealous when i hear how much better my german colleagues/friends' high school education was., compared to mine
@Calum Tatum we also seem to have a big emphasis on sport. Cricket and football are much more important than STEM :p
What hyperdimensional aspect ratio should I watch this in?
u need to project this video on a 2d plane. its only fitting!
21:16:10:9.
Sorry, but there is only one Answer to this: 42
im not sure im still learning myself
4900 hypervoxels
Outstanding work. Together with Ben, you are setting the standard for how the next generation of educational material should look like. I'm very impressed by your work in general and I didn't imagine it was possible to go so much further. This is so good, I'm still in shock.
You are making humanity fundamentally richer. There is no telling how big an impact innovations in education like this one will have in our collective future.
I'm proud of being a patron, I just doubled my pledge.
Thanks so much!
This is perhaps the highest quality content I've ever seen on the internet, not just on UA-cam. Absolutely incredible work.
I just became a patreon contributor because of this video.
no lie
After smashing my head against quaternions for almost a decade, this interactive simulation video has finally put things in some perspective.
Furthermore, the format of that platform is so powerful and SO smoothly executed.
Bravo, Grant and Ben. 👏 I am in awe!
You can find the explorable videos at eater.net/quaternions
i thing i have made a new system for 3d rotation and it doesnt break multiplication
edit#contact me in discord miketheking5#0399
He's probably not going to just put it in a pastebin and put it here so the youtube commenters can see
yep
Very nice. For the interactive videos, it would be nice if it paused progression until there hasn't been interaction for a while. When you go 'try playing around for a while .. ', and the video continues until the next segment where audio and interaction is played back, it just takes over what the user is currently doing. I get that the user can pause, but the playback could also put itself on hold until the user has not done any input for a while.
I remember the comment suggesting that name
>19th century versions of Wolverine and the old man from home alone
My sides
gesus
Justice for Hamilton
I had to rewind so I could process what he said, and then I paused the video and laughed for like 5 minutes
Being a software programmer, and a mathematician. I can tell the lengths 3b1b went for this video. No one has gone these lengths for a youtube video, I repeat. NO ONE
the source code seems to have 6000+ lines of code, must have been one heavy project
to be honest, writing videos with manim quickly becomes hundreds of lines but writing 3d scenes with rotations are wayy too complicated for my dumb ass
2:30 Me trying to tell my prof that singularities are features, not bugs.
Also: me, later, trying to tell my parents how an F is actually an A+ in 4D space.
This channel just keeps getting better!
3Blue & 1Brown takes a "Why?"
And, with logic disarmingly sly,
(Plus cool animation
And soothing narraration!)
Makes the complex as easy as Pi
--Best Wishes for Vivid Dreams & ongoing Flashes of Insight
Bravo!
(Or the hypercomplex?)
Fred
Are you Sprog from reddit? O__0
Really cool!
Nice
If you hold your mouse pointer in between the pi creature's eyes on the interactive video, it goes cross-eyed.
If you put the mouse on the eye pi shuts his eye.
@@theredstonehive So does Linus the linelander. Btw, the Pi's name is Felix (the flatlander, at least in the 3D explorable video).
If you hold the pointer at infinity it goes wall-eyed.
wow
@@theredstonehive and frowns
You are a living legend. These animations are so cool its amazing.
Was worth the wait.
What a nice video once again! I'm very glad that channels such as yours keep on giving quality maths contents. As a matter of fact, my professor recommended we watch several videos of yours in order to understand math more graphically and geometrically.
Hopefully, students that watch your video will become searcher that unravel mathematics because we need this kind of people today. Please, keep up this great work!
Nowadays your teaching helps me in my other subjects too
After watching this and the interactive videos, whenever I think of 3d rotations again, I cannot resist thinking in terms of the quaternions. There is just no other way that is more elegant than this!
This was exceptional, and I can honestly say that this is the first time I felt I truly begun to understand quaternions! Thank you!
One note about the interactive videos: Could there be a "zoom" control as well? It would make it PERFECT
The interactive videos are amazing! I finally feel like I have an intuitive grasp of quaternions and hyperspheres...I've been sooo confused for years
I am so happy you've created this. I work in VR and this is invaluable for me.
I just did the interactive thing and I feel genuinely enlightened lol.
As a hobby gamedev, quaternions have probably been the topic I've avoided most. Like all other topics I feel like I've been able to at least learn something about, but quaternions have always escaped me. I left it to "confusing computer math stuff I can't understand" and just used the functions that convert to and from euler angles. I saw another one of your videos, possibly a livestream, where my mind was blown by the simplicity of using cos(x) + i*sin(x) to represent 2d rotation, but seeing it apply to quaternions, where i just gets replaced with an axis for it to work in 3d is even more mind-blowing. I feel like I actually understand quaternions now, even enough to actually use them too. I cannot express the shear amount of confusion I went through trying to learn about them at first before giving up. This is the by far the best explaination and especially visualization ive seen for them! Awesome work!
Mind blown!!! Great job to both, you for the excellent explanations, and Ben for the amazing web development. So worth the wait!
I have never seen such good educational content as in your colab! This is truly mind blowing. Keep it up, you are an inspiration
You way of explaining concepts with the help of these visualizations and interactive interfaces is very much appreciable...This should be the way of teaching in this advanced and technical world.
You sir deserve a medal. Thank you for providing so valuable content. Keep up the great work!
Totally worth waiting!!
Finally a simpler and more visual friendly approach to quaternions
A 5 mins video is more clear then whole semester of lectures. Thank you again for providing free knowledge of UA-cam !!!
I always have to remind my that this channel is not that old because it should have 20 million subscribers! Always worth the wait for your videos because they're a real treat!
I've never had a good picture of what quaternions were supposed to be doing until now. The explorable video was incredibly helpful. Thank you for putting this together.
This is really exceptional! Explorable videos are the best educational tool I've ever seen so far in my life. And they are potentially perfect to use in many more topics. GREAT!!
Incredible effort in those animations, along with a great explanation. Thank you!
Been trying to wrap my head around this and your interactive videos really got me there. I feel pretty confident about this. Cheers mate
keep up the awesome work you do, it just nails it all, really feels like a fight for dignity, love it
just watching it gives so much insight on how the whole works, be it the outside world or inner perception, its all interconnected, its all really ONE with zillion faces
This is amazing! Had an aha moment during the last interactive video on quaternions and 3d rotation. When you showed how some, but not all, of the rotation of the first quaternion was canceled out by the inverse quaternion.
Question! During your studies, did you ever study any Control Theory? Like linear algebra, I feel it's a course that many struggle with fully grasping a lot of core concepts. After watching your videos on LA (which cleared up more in 40 minutes than half a year of university) I am just convinced you could do wonders helping students visualize and grasp a lot of core concepts there. Your way of explaining seems vastly superior to most educational channels that I've come across here.
Huge kudos from Sweden. Keep this art up.
@@Gonza-lh2vo can't say I disagree.
I literally have this exam in three days lol it would be nice
YES YES YES
Anyone looking for this I recommend Steve brunton's lecture series here on UA-cam. Not as high quality as 3b1b but it was great for me
@@RugnirSvenstarr Brunton and Nathan Kutz are awesome. I used their (and Peter Schmidt’s) DMD tutelage in my phd thesis
Totally worth the wait.
absolutely
I used to think this those math explanations and visualizations cannot be better, and then, this, truly interactive videos. Just amazing.
I am so happy to be among your Patreon supporters; you are a fantastic educator!
Absolutely extraordinary teaching mechanism. Well done @3Blue1Brown and to your friend. This was like looking into the future and seeing what education looks like. I'm blown away. And grateful! I'm literally using this in professional work.
Three hours later. Totally epic project! Really trippy to think of the sphere as the stereoscopic projection of the hyper-equator. Really nice to see the analogous behavior comparing it with the projected 2d case playing around with positive and negative real part and seeing the projected pole moving inside out to the equator for positive real part and for negative real part moving from infinity inwards.
You really outdid yourself with this one Sanderson
Just checked out the explorable videos - so wonderful!
You gave me that AHA moment that I wish I had had 30 years ago. I understand quaternions quite well (so I thought) but wasn't clear about what the code was doing that converted them to a 3x3 rotation matrix, but FINALLY I totally get what it's doing!!! BTW - it just goes to show you that you don't necessarily need to know all there is to know to move forward in math, for example, I wrote the math library that includes quaternions and matrix multiplications, points vectors etc. that's at the core of both Maya and AutoCAD, both of which are exposed to 3rd party developers via the API, so if you made a call to such a function, then I wrote, named, designed etc. that code, you're calling. I've taught many folks about quaternions, but NEVER with the insight I've gained from your work Grant! Thank you!
I also LOVE your video about Fourier transforms, an I have a goal now to get a handle on quaternion Fourier transforms, I could really use your help! :-)
Great video! I use Quaternions/euler angles almost every day when rotation stuff in a 3D space - but it's still really difficult to understand. So thanks a lot! 👍🤓😍
THANK YOU!!!!! I've been trying to figure out quaternions for a long time now. This demonstration really helped! Keep up the good work!
Wow! That interactive app really brought it home! Fantastic work by both of you! Thanks!!!
Can we just appreciate what a smart idea it was to put the first part of the explorable video on UA-cam so that UA-cam can recommend it to people?
Although I do still that this video should have more than 500K views
I'm actually a second year PhD student working on "quaternion neural networks". I waited for this kind of visualization for year now, i even though of building my own software ... Thanks you so much !
Si tu connais pas l'algèbre géométrique frérot: tu vas revoir ta thèse en entier je pense. xd On peut en discuter si tu veux, perso je taffe sur un raytracer non-euclidien fractale avec ça. Chaque sous-espace 2D d'une algèbre géométrique est un plan complexe en natif; chaque sous-espace 4D un truc isomorphe aux quaternions, mais sans quelques-une des pathologies habituelles (notamment les versors qui généralisent les rotors). Après t'as le "geometric calculus" (analyse mutlivectorielle) qui peut te permettre d'aller encore plus loin. Le "fundamental theorem of geometric calculus" permet de retrouver tous les théorèmes intégraux de la physiqye moderne (Stokes, Green) en qqs lignes de preuve. Tu vas kiffer !
www.geometricalgebra.net/
@@mathephilia "Si tu connais pas l'algèbre géométrique" -> est-ce ce que j'ai dis ? Je l'ai juste remercié d'avoir fourni un outil de visualisation qui sera très pratique pour des démonstrations lors de conférences, ou pour de simples discussions entre chercheurs. Donc non, je ne pense pas avoir besoin de revoir ma thèse. Merci quand même pour les infos.
@@titouanparcollet5115 C'était bien sûr une exagération dans l'objectif de faire rire: mais ce fut un échec cuisant. xd Aucune condescendance ou mépris n'était sous-entendu dans mon message, tkt. ^^ Mon message en plus clair: au vu des retombées positives de l'algèbre géométrique dans mon propre travail (alors que je me servais des quaternions auparavant), et sachant à quel point peu de gens connaissent ce formalisme, surtout en France et dans le monde francophone, je me suis dit qu'il pourrait t'intéresser dans ton propre travail. J'aimerais personnellement utiliser cet outil pour rendre les espaces statistiques massifs plus facilement compréhensibles, mais ça va demander plus de recherche de ma part, et ce sur plusieurs années. Good luck en tout cas pour la thèse, la soutenance et la suite ! :)
@@mathephilia L'approche était peut être un peu trop agressive pour l'humour ;). Je jetterai un oeil à ce dont tu as parlé.
@@titouanparcollet5115 Le ton passe toujours mal à l'écrit, snuf. :'(
Je pense que tu vas apprécier, en tout sérieux: c'est très beau. :) Oh, et j'y pense, si t'as la flemme de te farcir le bouquin de 600 pages pour les informaticiens, t'as aussi cette chaîne UA-cam qui te fait une intro courte du coeur du formalisme et des enjeux liés à celui-ci : ua-cam.com/channels/ymE67THrWoeTABxzJm1wdg.html (commence par geometric algebra, puis geometric calculus, c'est en gros 5/6 vidéos de 10 minutes pour chaque sujet)
Waited too long for it but it's so much worth it. Great job by Ben to develop easy to use and intuitive web app to explore this. Thank you, Grant for your amazing efforts
Brilliant is bringing on a whole new wave of interactive learning, it's great.
Literally searched for this topic less than a week ago. Thanks for posting!
my thesis will be using quaternions. Thanks for these videos and the website. Very helpful. I went from no understanding to a decent grasp of the concepts in no time at all.
You are the best science youtube channel, and that's saying a lot since there's LOTS of great science channels right now :)
I binged Ben Eater's videos back in April/May. REALLY worth viewing
Grant and Ben Eater are unbelievable smart, talented and generous 🥰
Thanks a ton for sharing your knowledge in such an exceptional high quality and easy way in the public.
So that mortals can understand it partially too 😀
Clearly the best youtube channel that there is. Your videos r just amazing. If you had infinite amount of videos I would starve because I cant stop watching them lol. Keep up the good work!
The interactive video thing is absolutely fantastic. Beautifully intuitive.
0:52 "19th century versions of Wolverine and old man from Home Alone" LMFAO
Underrated joke
It would be great if you covered geometric algebra, which contains both quternions and regular vactor algebra. It seems like the most natural way to encode physics, at least for me.
YES! GEOMETRIC ALGEBRA IS THE BEST THING
It's not. Most of the standard "geometric algebra simplifies physics" claims are just nonsense.
Well, no, physics almost never concerns itself with specific orientations and so almost never needs quaternions specifically (just like it basically never uses rotation matrices), but when putting the ideas of physics into a computer, they *do* become important and very much help tremendously (just like they do in animation)
Furthermore, there are a fair bit of quantities that make a *significant* amount more sense if you think of them using Geometric algebra instead of classic vector algebra. For instance, angular velocity and momentum both are usually done as single numbers when in 2D but somehow magically become vectors in 3D, and while usually not relevant, this system has no good way of being extended into 4 or higher dimensions. However, if you instead think of them as quantities in a _planar_ direction and represent them as Bivectors, it all makes so much more sense. Angular momentum is a "scalar" in 2D, because there is _only_ planar direction, and so all angular momentums must be scalar multiples of that one plane; and it's a "vector" in 3D because every plane (and thus bivector) can be represented as its normal vector. In fact, this even makes angular momentum in 4D make sense (once you look at the math) and even explains some of the really weird results there (like how you can have two completely independent rotations happening at the same time).
@Anvil What you're saying about bivectors is correct, but the formalism of *geometric algebra* in particular is not the best way to understand them -- the right formalism is tensor algebra (which is indeed exactly how you represent rotational things like angular momentum and cross products in real physics), where "bivectors" are just antisymmetric rank-2 tensors.
As for two independent rotations happening at the same time, I don't think anybody regards that as particularly weird and unintuitive. You have four dimensions, each rotation only affects two of them. Of course you can do two at once -- it's just like how you can do two scalings at once in R2, for instance.
@Abhimanyu Pallavi Sudhir
Yes, I am aware that geometric algebra (or rather Clifford algebra) is just a tensor algebra where the square of a vector is a particular quadratic form.
Additionally, I'd definitely agree with you that Geometric algebra is not the end all be all of math and physics. Hell, it can't even do general linear transformations. However, as a formalism, I really don't think it's much of a stretch to say that it makes some things more sense than the default 3D + cross product system, and honestly, it's way more intuitive than tensors. But of course, while I have found in my experience that GA makes things way simpler, there will always be things like moment of inertia that like to defy simplification.
(Furthermore, full disclosure, I am definitely not a physicist. I tend to work with physics simulations in particular way more than doing theoretical and high level physics, so it very much may be that in your use case, tensors work significantly better)
Also, yes, in hindsight the two rotations at once makes perfect sense, but it's one of those things that is surprising to someone who hasn't seen it before and has only worked with 2D and 3D using only the cross product and very little abstract formalism.
Wait for a video, build suspense, be disappointed that it's short, then get a sweet surprise: it's not just a UA-cam video.
It's an amazing feat of 3Blue1Ben.
Really, the Simplest way ever to explain quaternion, I really enjoy how did u grasp the ideas and how did you simplify it, ♥
This is amazing. You should start platform for this kind of stuff. (educational interactive "videos")
Regarding 3:15, the distance between 4, in other words (4|0) and (4|1), the latter being equal to 4+i, is 1. The distance, in a quaternion context, between (0|0) and (4|0) can be defined as 16. In that case, the distance between (0|0) and (4|1) is exactly 5. You can then forget there is any number which times itself is equal to 5.
I just can't thank you how much it helped me to understand this topic
This is one of the best things that has ever happened on the internet, at least talking about math. Thank you!
wow, that interactive thing is amazing. It's definitely worth the wait thanks Grant your awesome.
What a great idea to make an even more intuitive way to understand complex things like quaternions! I have an exam on robotics and this was all very abstract for me. You're interactive video's really helped me get this topic on a whole new level. Thanks al lot!!
Ps I'm always a big fan of you're video's to really understand the meaning of complex mathematics!
You know, with how awesome your explanations are, I am beginning to feel that one of the biggest difficulties to learning math isn't complex ideas but just the fact that mathematicians suck at writing things down :p
Which is to say, there is so much ambiguity and gotcha moments in notations that it just looks like black magic even if you understand the algorythm separately.
You guys made something incredible with these interactive videos
really loved this and it helped immensely, thank you very much for creating these fantastic learning resources
That explorable video stuff is amazing. I can't imagine the amount of time Ben put into that. Also the little Pi Guy's eyes follow your mouse and if you put the mouse over his eye, he frowns.
That website is incredible, you guys deserve more media attention
Never seen something like that ! really impressive, congratulations ! You should teach teachers to create similar learning tools.
I will exam on Analytical Mechanics tomorrow and getting stuck to make sense of the orientation of rigid body with quaternions! Thank you so much for the video! Really very helpful!
Love how you mix coding and visualization, keep it on.
I've found this video by accident, and I've found your site with interactive demos through it. I think I finally got it. Because quaternion rotates around two 4-dimensional circles, and you only need rotation of one, you use two of them to cancel rotation of the second circle.
Awesome video! You should do something on differential forms and the generalized stokes theorem
Unrelated, but your 3d visualizations have gotten better! rewatched the essence of linear algebra series, and the 3d there was stuttery and had unsightly arrows. Very happy to see a creator self-improve
I was just waiting for one more of your amazing videos!!! thanks so much 3B1B
Thank you.
I first learned of quaternions in studying Maxwell's electromagnetic equations as modified by Oliver Heaviside and others.
This in the last month or so.
Before that, I had no knowledge of quaternion math. I talked with my granddaughter who is a mathematician and she had not heard of them.
Please keep at publicizing quaternions.
Again, thank you.
Apart from the explanation, I adore the "Normandy Bridge map" music you use.
You are a living legend
Im in awe of how intuitive this is
that interactive video thing is fucking nuts, I'm in awe
I appreciate the video, I'm currently exploring unity game development to practice more C#. Quaternions have come up several times, this video helped clear up what they are exactly. Thanks!
Huge Thanks for all the work You do! Very good explanation!
Grant, you never fail to amaze me. Thank you.
After trying to program 3D rotation and struggling with gimbal lock while not knowing what they is, I'm glad to finally hear of quaternions.
Amazing video to explain the usage of quaternions for rotating objects. Some useful notes I made: Quaternion 3D points look exactly like 3D Vectors in 4D homogenous coordinates. Multiplication order matters. It needs to be from left to right for a mathematically positive angle rotation. For those, who did not see it already, the quaternion multiplication computes a vector cross product + negative scalar product + linear combination between the two vectors. The scalar product is stored in a 4th dimension (the real scalar axis). The 2nd multiplication is required to get rid of the value in the 4th dimension after the first multiplication and both multiplications make two half rotations together.
I think. the title can be misleading. I thought of a mathematical explanation what Quaternions are designed to be. But I still don't understand it properly, even when I understand complex numbers. This video cannot be understood by people who just know school math. It looks like being a reference to another site but I know that site already from a Computer Graphics lecture. Good school graduates could be able to compute a point rotation without matrices or quaternions by interpolating tangential perpendicular vectors.
Learned a lot once again :)
Easy to understand and awesome examples!
Thanks a lot for these videos from someone who does rigging (tech animation) and doesn't really understand the math behind 3d space well enough.
Thank you so much! I’m a PhD student in biophysics and your videos are extremely valuable to me. Wish you best of luck and great success in all your endeavours.
Came for the quaternions, stayed to play with the pi creature in the corner. This is so delightful!
The explorable videos are incredible. What a perfect way to make it "click".
you are the perfect combination of engineer educator and artist.
You're a legend. The wait was worth
Wow that brings learning to a whole new level! Thanks a lot!
That's simply amazing: learning linear algebra and at the same time have the possibility to "touch" it...
Wow ! This content is amazingly easy to understand ! Thank you !
The website you and Eater created is awesome, it makes learning quaternions so intuitive that I'm actually starting to love the idea. Furthermore I got a triggered when 4d stereographic projection started to resemble electric fields xd.
Oh my God these interactibles are awesome.
Has anyone ever told you you're a good man doing good work, 3b1b? Because you're a good man doing good work. I'm sure someone has, but now someone +1 has.
Thanks so much, I’m working on a video game and now it all seems much more manageable