Basic Intro to Quaternions for 3D Rotations

  Рет қаралды 42,771

Covenant Turtle

Covenant Turtle

Күн бұрын

GuerillaCG's video on gimbal lock: • Euler (gimbal lock) Ex...
Explanation of quaternion formula: math.stackexchange.com/questi...
Why use quaternions for rotations?: stackoverflow.com/questions/8...
Interpolation comparison animation: tiborstanko.sk/lerp-vs-slerp....
Details of interpolation: splines.readthedocs.io/en/lat...
3Blue1Brown's interactive videos: • Visualizing quaternion...

Пікірлер: 32
@rabbishekelstein6003
@rabbishekelstein6003 10 ай бұрын
bro really made the best video on quaternions on youtube ever and then started posting tf2 and deeprock galactic pretty good👏
@pigeon4422
@pigeon4422 Жыл бұрын
I've spent like 7-ish hours learning quaternions and taking multiple pages of notes on them over multiple different yt videos, and honestly the simple explanation of using it as a vector multiplied by a scalar just made everything click for why this is so useful and how it should be used in computer science
@DoNotChooseBlank
@DoNotChooseBlank 10 ай бұрын
7-ish hours 💀💀💀
@2fifty533
@2fifty533 7 ай бұрын
this is nowhere near a concise description of how quaternions work
@ryanswindell1936
@ryanswindell1936 Жыл бұрын
Best video I've found so far as an intro to quaternions!
@compilererror2836
@compilererror2836 Ай бұрын
bro went from shitposting to dropping the best quaternion video in existence and then went back to shitposting literally the goat
@miggi666
@miggi666 2 ай бұрын
Holy s..t, that's the best and short explanation I've ever seen. Thank you.
@tomq6491
@tomq6491 4 ай бұрын
maybe the best and briefest explanation of the topic, thanks.
@amineremache
@amineremache 2 жыл бұрын
Thanks man, that was really a "right to the point" explanation. I have been dealing with quaternions for almost a year now, and this is one of the best introductions I could find 👍
@CovenantTurtle
@CovenantTurtle 2 жыл бұрын
Happy to hear it!
@fabi0bmx
@fabi0bmx Жыл бұрын
Very good explanation. Simple, concise and clear. Thanks 🙏
@vatsalpatel6330
@vatsalpatel6330 Жыл бұрын
That was a really good video, solved many of my doubts. Thanks.
@namajkatiufputkata
@namajkatiufputkata 3 ай бұрын
great explanation!
@terrylyn
@terrylyn Жыл бұрын
Incredibly useful! Finally it all clicked together in my head after seeing the unit sphere explanation, thank you!
@Priya_dancelover
@Priya_dancelover Жыл бұрын
awesome
@edgarbonet1
@edgarbonet1 Жыл бұрын
Nice video! Short and sweet, with very clear explanations, and clear graphics too. Thanks for posting it! I have a small correction and some comments though. Firstly: quaternions are not faster than rotation matrices when it comes to rotating a vector. They take 15 multiplications and 15 additions, whereas only 9 multiplications and 6 additions are needed with a rotation matrix. If you have multiple vectors to rotate by a given quaternion, the fastest method involves first converting the quaternion to a rotation matrix. On the other hands, when it comes to chaining rotations (combining multiple rotations into one), quaternions are significantly faster than rotation matrices. Also: although quaternions do not suffer from gimbal lock, neither do rotation matrices. Gimbal lock is an issue with Euler angles.
@idlemarcus
@idlemarcus Жыл бұрын
yeah, it seems like quaternions' popularity comes from a fair amount of misinformation being passed around, and perhaps some hipster-like infatuation with complex numbers and 4d math.
@CovenantTurtle
@CovenantTurtle Жыл бұрын
Thanks for the feedback & corrections! A slight clarification regarding speed: while you're right about the number of operations, that's assuming that you already have all the matrix elements pre-computed for use. If you only have the three angles describing your rotation, then you still have to compute a big mess of trigonometric products, sums, and differences in order to construct your 3D rotation matrix, which ends up being many more (and more expensive) operations overall. I probably should've mentioned this somewhere in the video.
@skilz8098
@skilz8098 Жыл бұрын
@@CovenantTurtle That may be true but there are very good and well optimized libraries that provide good use of quaternions for you. A couple of really good math libraries are GLM, Eigen and a few others. GLM is easier to use as it's a templated headers only library, no need for compilation, or linking, just point to appropriate folders with the needed include directives. As for Eigen it does take a little bit more work to set up as you'll have to install the Library - API, and then you'll have to make sure you're properly linking against it's compiled libraries depending on if you're linking it dynamically or statically at least with C/C++ that is... And I'm sure that either Boost or GNU has some good libraries. Quaternions when implemented correctly are still fairly fast and efficient even at the hardware level especially if their using the vector intrinsic registers such as MMX... sure it might be a few more instructions than a basic rotation matrix, but when you're working with 3D graphics you typically don't use a 2x2 or 3x3 matrix, you typically use a 4x4 MVP matrix. And quaternions translates and works well with 4x4 matrices, and they're quite easy to convert to a vector4 object. They're still fairly efficient these days and if you start to target the graphics cards that support 1/2 precision floating points... you can do a lot of amazing tricks with them. They are a very versatile and powerful tool to have in one's toolbox.
@MrRap74
@MrRap74 2 жыл бұрын
Thats good buddy 👍
@Street_Cyberman
@Street_Cyberman Жыл бұрын
thank you for saving me 😢
@c6istooshort
@c6istooshort 2 жыл бұрын
based
@Evan490BC
@Evan490BC 2 ай бұрын
Nice introduction to quaternions. A small mistake: since these are position vectors, the heads are at the origin and their *tails* are the points A and B. Another point: the transition from the expression of Q to the Hamilton product is not very intuitive because you skip the matrix representation. (Why are we allowed to take the inverse of Q?)
@CovenantTurtle
@CovenantTurtle 2 ай бұрын
1) But aren't position vectors just a mapping *from* (i.e. tail) your initial point *to* (i.e. head) your final point? 2) I completely agree that the jump from the definition of Q to the definition of the Hamilton product isn't intuitive - but, for the purposes of this video being a quick introduction to how and why you might use quaternions for rotation, I don't think it matters. There are links in the description for more information, and I imagine anyone who's really looking into the various representations of rotations will come across the 4x4 matrix equivalents of quaternions sooner or later.
@farazfarooqi4675
@farazfarooqi4675 Жыл бұрын
What software is being used here to demonstrate all the 3D figures???
@CovenantTurtle
@CovenantTurtle Жыл бұрын
I drew all of these diagrams myself in paint.net (which despite its name is actually a program, not a website).
@RalphOpinion
@RalphOpinion Жыл бұрын
if linear is jerky and spherical is smooth transition, how do you ramp a transition or ramp down?
@CovenantTurtle
@CovenantTurtle Жыл бұрын
It's not that linear is jerky, it's that it already includes ramping up and ramping down! I highly suggest you check out the interpolation comparison animation I've linked in the description. As for getting arbitrary changes of angular velocity, instead of linearly increasing the value of the interpolation parameter (usually labelled "t"), you can increase it slower or faster at different points of the animation.
@RalphOpinion
@RalphOpinion Жыл бұрын
​@@CovenantTurtle thanks for replying. I saw the 3d difference lerp and slerp. good visual btw from the link. Let me pinpoint my problem exactly. I am using blender a 3d software that I am trying to animate eyes moving. Eye movemebt has to ramp up or down in speed not in location or eye orientation. so for the Lerp slerp example you posted, both are linear speed in turning to 3 o clock. lets say on the first third I want it to move at speed x and x2 on the second third of the movmement from 12o clock to 2 oclock. the x4 speed at 2 o clock to 3 o clock. Here is tge question. using quat controls and not time. how do I use the 4 quats to control the ramps speed of tge eye ball?
@xash3000
@xash3000 Жыл бұрын
W
@Hurrchild598
@Hurrchild598 2 жыл бұрын
Eh buddy ...
@christophergame7977
@christophergame7977 Күн бұрын
Why do you say "Rotate it such that it becomes the vector B" ? True, Americans don't speak ordinary English, and speak so. An ordinary English speaker would say "Rotate it so that it becomes the vector B". 'Such' is an adjective. 'So' is its corresponding adverb.
How quaternions produce 3D rotation
11:35
PenguinMaths
Рет қаралды 88 М.
Godot's Quaternion Variant is Beautiful (and misunderstood)
18:52
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 18 МЛН
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 43 МЛН
Quaternions EXPLAINED Briefly
17:51
Mathoma
Рет қаралды 301 М.
Visualization of tensors  - part 1
11:41
udiprod
Рет қаралды 568 М.
Quaternions
39:07
UC Davis Academics
Рет қаралды 169 М.
How to think about Quaternions without your brain exploding
10:25
Fantastic Quaternions - Numberphile
12:25
Numberphile
Рет қаралды 1 МЛН
3D Rotations and Quaternion Exponentials: Special Case
24:01
How to Use Quaternions
14:20
Positive Altitude
Рет қаралды 11 М.
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН