How to Use Quaternions

  Рет қаралды 9,501

Positive Altitude

Positive Altitude

6 ай бұрын

If you need to work with 3D rotations for graphics, game development, robotics, and other applications - this video is very useful for you. This mathematical object makes operations with an orientation of a 3-dimensional object very easy and efficient. You will learn all you need to know about quaternions and how to use them for 3D rotations. After watching this video you will know enough even to implement quaternions in your own software!

Пікірлер: 41
@drobin9040
@drobin9040 2 ай бұрын
This is by far the best explanation for quaternions in 3d graphics I have found! The justification to abandon Euler angles is also straight forward, no useless talk about gimble lock. Thank you!
@have_fun1107
@have_fun1107 13 күн бұрын
did you found anything else?
@drobin9040
@drobin9040 4 күн бұрын
@@have_fun1107 What do you mean? Other videos on the topic?
@have_fun1107
@have_fun1107 4 күн бұрын
@@drobin9040 yes or anything else that may help building intuition?
@drobin9040
@drobin9040 2 күн бұрын
Have a look at Freya Holmer’s content, she’s awesome at explaining math with visuals.
@annadyakonova9389
@annadyakonova9389 6 ай бұрын
This is great! Very well explained and beautifully visualized
@zdspider6778
@zdspider6778 10 күн бұрын
5:07 I don't understand how _theta_ and _-theta_ are the same angle ( or _q_ same as _-q_ ). That doesn't make sense. *Edit:* Oh, because V and -V point in the opposite directions. Okay. So rotating in the opposite direction when the axis vector is inverted, actually results in the same rotation. Now I think I get it.
@OfcGatormanJones
@OfcGatormanJones 5 ай бұрын
this is very much over my head in understanding but its awesome to hear you talk about quaternions!
@hayfahvytsen
@hayfahvytsen 12 күн бұрын
'Have a nice day and please don't use Euler angles.' LOL. Awesome. 👍
@torben_rr
@torben_rr 29 күн бұрын
Well explained!
@undeadpresident
@undeadpresident Ай бұрын
This was helpful, I appreciate it.
@drancerd
@drancerd Ай бұрын
I need more! All others videos are copypaste of the sames videos and "papers", no one teach how to use them. I need it for physics.
@playduino
@playduino 4 ай бұрын
wow, well done!
@ihbarddx
@ihbarddx 5 ай бұрын
This might be enough for a first toehold in the subject!
@elaprendiz7208
@elaprendiz7208 18 күн бұрын
Nice video. Do you can make some example application in robotic? Thanks 🙏🏽😊
@Positive_Altitude
@Positive_Altitude 17 күн бұрын
Well, you can check out the video about the TVC model rocket. The attitude estimation/correction system was built with quaternions and formulas I have covered. And it's probably can be considered "robotics" :) Same goes for any drone / UAV or for example describing orientation of the robotic arm end effector.
@user-yx4jh6gi5n
@user-yx4jh6gi5n 6 ай бұрын
Достойно!
@theapexpredator157
@theapexpredator157 3 ай бұрын
I have no idea how to use quaternions for Maya...
@bulliepm6278
@bulliepm6278 3 ай бұрын
Hello do you know how to use it for finding joint angle What is the operation for one quaternion for the lower arm and for the upper arm ? And how to find flexion extension or pronation supination ?
@Positive_Altitude
@Positive_Altitude 2 ай бұрын
Hey, I looked up these terms. It does not seem to be related to quaternions directly. So I don't think I can help with that.
@mexitechnology7838
@mexitechnology7838 5 ай бұрын
Hey Amazing content. Wondering What path do you recommend to a newbie like me trying to getting into this Thanks
@Positive_Altitude
@Positive_Altitude 5 ай бұрын
Hey! What exactly are you interested in?
@mexitechnology7838
@mexitechnology7838 5 ай бұрын
@@Positive_Altitude Rockets
@Positive_Altitude
@Positive_Altitude 4 ай бұрын
Sorry. I forgot to answer :( I would start with understanding the basic physics of rocket flight. Like rocket stability (for regular aerodynamically stable rockets). Also how rockets are usually constructed, and what materials are commonly used. Then maybe try to build/launch a simple rocket! Also, check out r/rocketry subReddit -- there is a lot of information on that topic and you also can ask your questions and maybe get some help!
@mexitechnology7838
@mexitechnology7838 4 ай бұрын
@@Positive_Altitude Thank you so much will keep an eye on your content
@zdspider6778
@zdspider6778 10 күн бұрын
9:37 Why is the first one (alpha) same formula as last one (gamma)?
@Positive_Altitude
@Positive_Altitude 10 күн бұрын
This is because we use ZYZ Euler scheme in this example. "ZYZ scheme" means that we make a sequence of 3 rotations around local axes 1) by alpha around Z; 2) by beta around Y 3) by gamma around Z. You might be thinking "why do we rotate twice around Z?" It works because each rotation is done in the local reference frame whose orientation is also changed with each rotation. So the first Z rotation is not the same as the last one, because when we do the last rotation, the reference frame is re-oriented by the first and second rotations. But because the first and third rotations are both rotate around local Z, the formulas are the same. To calculate q_gamma for example, I am using the formula explained at 4:40. In this case vector V = (0, 0, 1) because it is a normalized vector aligned with Z axis and theta = gamma. So just using this formula you will get all formulas shown at 9:37 Hope that helped :)
@erawanpencil
@erawanpencil Ай бұрын
@11:15 what does 'tmp' stand for? I don't understand the errors that arise without normalization (the rocket getting bigger and bigger).... what causes that to happen and why does that normalization equation fix it? Is this similar to 'renormalization' in physics?
@Positive_Altitude
@Positive_Altitude Ай бұрын
'tmp' stands for 'temporary'. This formula is an approximation and it makes the norm to slightly increase with each step. I mentioned that rotation quaternions should be normalized, but actually, you can use non-normalized quaternions with the same math to transform coordinates. But in this case, you will not only rotate the space, but also you will scale it by the factor equal to the quaternion's norm. That's why if we let the quaternion's norm increase, the object gets bigger. To explain why exactly this happens I will give you a very similar example: Imagine that we are trying to draw a circle, but we can draw only short straight lines. And we use an algorithm: 1) Draw a line from the current point to the center (a radius) 2) Draw a short line perpendicular to this radius 3) The end of this short line is the next point of the circle 4) Go to 1) If we do this with very short lines this kinda works, but actually, every new point will be slightly further away from the center, and the radius will increase with each step. And if we keep doing it we will draw a spiral instead of a circle. If our steps are small it will spiral out slowly. With bigger steps, the problem gets worse. But we can fix that. After each step, we can make a little step toward the center that will make the current radius equal to the desired radius. That is exactly what normalization does. This example is VERY close to what happens with quaternions and this formula. In the case of quaternions, it's just a trajectory (not really a circle) in 4-dimensional space which I personally struggle to imagine. No, this is unrelated to renormalization. This is just us fixing an error caused by using approximation.
@erawanpencil
@erawanpencil Ай бұрын
@@Positive_Altitude Thank you, I think I'm getting it. The normalization sort of re-orients or self-orients the origin point of the gyroscope, the center of all the angular velocities right? That's why when you turned normalization off, it sort of dilated in-and-out/breathed like a growing spiral?
@erawanpencil
@erawanpencil Ай бұрын
@@Positive_Altitude Do you need to renormalize all quaternions or only gyroscopic ones with angular velocity? Does angular velocity add more requirements to make it work?
@Positive_Altitude
@Positive_Altitude Ай бұрын
@@erawanpencil I would not say that it "re-orients" it just scales it. Norm is literally a length and all proper rotation quaternions should have the length = 1. We just fix the error caused by this formula that makes quaternion slightly longer than it is supposed to be. Usually, when we just combine rotations there is no need to normalize quaternions. Because if we have two normalized quaternions, their product will be a normalized quaternion too. But also there is no harm in normalization. If you normalize a quaternion that is already normalized it will not change it. The angular velocity formula is just kinda weird. Mathematically it is obtained with the assumption that time step dt is "infinitely small". But there is no such thing as an infinitely small number when we do 3D graphics or iterative simulations. So in real life, this formula produces a small error both in direction (orientation) and length (norm). To deal with that we need 1) use as small dt as we can, to minimize the error in orientation 2) normalize quaternion to always keep norm = 1 as it is supposed to be
@kongolandwalker
@kongolandwalker 6 ай бұрын
@nickpetrovsky
@nickpetrovsky 4 ай бұрын
Видео ис зе бест ин кватернион эриа :)
@user-jb1nb6en4z
@user-jb1nb6en4z 5 ай бұрын
Хард рашен акцент!
@Positive_Altitude
@Positive_Altitude 5 ай бұрын
Come on, it's not THAT bad ;)
@user-jb1nb6en4z
@user-jb1nb6en4z 5 ай бұрын
@@Positive_Altitude шутка, все ок, все понятно)
@Mateo-wf1yz
@Mateo-wf1yz 2 ай бұрын
I dont understand any of this and im usually quite good with both technical and math stuff. 😞
@Positive_Altitude
@Positive_Altitude 2 ай бұрын
Sorry to hear that :( Is there anything I can help with?
@NoNameNoShame22
@NoNameNoShame22 20 күн бұрын
Dafuq is React doing there 😂
@Positive_Altitude
@Positive_Altitude 19 күн бұрын
lol
Euler vs Quaternion - What's the difference?
8:49
Class Outside
Рет қаралды 32 М.
Fantastic Quaternions - Numberphile
12:25
Numberphile
Рет қаралды 1 МЛН
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30
1 класс vs 11 класс  (игрушка)
00:30
БЕРТ
Рет қаралды 3,4 МЛН
WHY THROW CHIPS IN THE TRASH?🤪
00:18
JULI_PROETO
Рет қаралды 9 МЛН
What Is The Most Complicated Lock Pattern?
27:29
Dr. Zye
Рет қаралды 1,3 МЛН
Rotations in 3D Graphics With Quaternions
8:23
Manifolds in Maryland
Рет қаралды 6 М.
How quaternions produce 3D rotation
11:35
PenguinMaths
Рет қаралды 86 М.
Урок Houdini "Кватернионы для чайников" (RUS)
23:21
Houdini по-русски
Рет қаралды 41 М.
a quaternion version of Euler's formula
20:33
Michael Penn
Рет қаралды 71 М.
QUATERNIONS Explained VISUALLY in 381 Seconds
6:21
Raycastly
Рет қаралды 2,3 М.
#225. КВАТЕРНИОНЫ и углы Эйлера
10:34
Wild Mathing
Рет қаралды 90 М.
Godot's Quaternion Variant is Beautiful (and misunderstood)
18:52
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30