Quaternion Rotation and the Sandwich Product

Channel: silencedidgood Published: 2012-09-11 1,828 words Source: auto_caption
Advanced Mathematics & Geometric Physics

Transcript

Hello everyone. This is Mr. 13 things and welcome to we4kids.com's discussion of and call it procitizing for 4D mathematics for dimensional mathematics also known as quatians also knows known as Hamiltonian numbers. Hamilltonian not out tonian numbers. And what I like to think of it is is the math of satellites and robots.

Now, obstensively, this is my little attempt at getting folk to see that this concept of lattice mathematics, I like that, lattice mathematics, with a little bit of tweaking ties our kids into their future and not our past. Um, and to put that in context, I think it was 57, I'll be wrong on that, when the first satellite went up into the sky, and I'm not sure about the first robot. So, this goes from science fiction to reality. And it's comes about by the use of four-dimensional math. I'll put a link here to those flying robots from TED this year playing the James Bond theme.

uh and let you know that sometimes you take 15 dimensional math down to fourdimensional math and then four-dimensional math doesn't sound so bad. Um and what is it done? It's basically used for a number of things but basically combining rotation. So we're going to go through this simple process uh of showing in effect uh tying it to a link. I'll also put here a little kind of um little code snippet that's posted out in Khan Academy that I'm working on that kind of does this justification a little more palatably I guess in terms of how lattice mathematics turns into four-dimensional rotation. So the problem that we're trying to get around is we're trying to get around of something called gimble lock.

Gimbal lock now. Okay. We we don't want gimbal lock. Uh and that comes about when you're kind of doing rotation about three axes and then one thing gets in the other and you can no longer mathematically rotate. So you get around that by dealing with the mathematics uh four dimensions.

When we talk about four-dimensional math, what we're really in the end talking about is dealing with uh a real portion and then a vector that has three components. Okay. And these three components turn out to have their roots back to the imaginaries numbered I, J, and K where I 2 = -1, J^2 = -1 and K^2 = -1. But also I J K = -1. And if you think thought e to the i pi blow blows your mind, then this can blow your mind even more.

But it works by using this multiplying um two quatians together in something called the sandwich product. We'll see why in a little bit. Sandwich product, you can basically get to the point of doing pretty complex rotations relatively simply. um and those and then eventually combining complex rotations. For instance, the sun around the earth and the moon around the earth and maybe the satellite of a Apollo spacecraft molting multiplying upon around the moon.

So combining quatians uh is something that uh makes the the makes makes it important to understand how to do a basic quatian rotation. So the idea of the sandwich product we'll pick up here in a second. We'll talk about uh a couple uh discussion points here before we move on. All right. So what each quatnian is going to be expressed either as four numbers or real jk or a real number and then a vector right and that vector is going to be a threedimensional number with a real number that becomes three-dimensional vector.

That means a fourdimensional if you want think about it as a vector that way. And what you're going to be doing is you're going to multiply multiplying a quatian times a point taking that product and then multiplying it by the conjugate the conjugate of the quatian. Um and the conjugate you'll find out when it's a complex number the conjugate of 1 + i is 1 minus i. But the conjugate of 1 + a vector is 1 minus a vector in this case. So in other words, if this is a vector 3 i + 4 i + 5 i, the conjugate is minus 3 i - 4 i - 5 i.

All right. So we're going to be looking at the sandwich product. So, what I'm going to do here is something we don't like to do too often, but we're going to go ahead and just go ahead and erase all this. Edit, cut, and we'll talk about how these quatronians are defined. First off, let's talk about how the points defined.

So, you'll have a point in 3D space. 3D space, of course, is going to require that you've defined your coordinate system. which means you have an origin, a plus x direction, and then an up direction, which is typically Z. And I'll post a video out here that shows you how you basically, this is the best way to think about it. Put your put your uh fist basically at the origin.

Point your pointer finger to the x direction. Put your thumb in the z direction and then your cocked expressive finger becomes the y. So this is what when I talk about having a point in 3D space and let's for grins think about that point being someplace on a globe in a little bit. So that's one thing we we're going to have that's the point. The other thing we're going to want to do is talk about the quatian of rotation.

So quater turn the rotation quturnian and that's going to be defined effectively what goes into that is the axis of spin and then the angle of spin. The axis of spin is going to be a unit vector vector of length one. And the angle of spin we're going to call alpha which is going to be in a positive counterclockwise direction. All right. So how do you define the quatian? The quatian to do a spin right about this axis of spin and this angle of spin is going to be the real portion.

The real portion is going to be the coine of the turn angle divided by two. Okay, easy enough. And then the vector portion which is the three-dimensional imaginary vector is going to be the sign of alpha / 2 times the unit vector of the axis of spin. So the real port again this is the quat turnian for rotation edit undo this is what it's going to be it's going to be comprised of that and you can either think of that as either four components or a real component and a three-dimensional imaginary component that's how you get the quatrum for rotation for the point basically the real portion is going to be equal to zero I know that Take that undo. I believe it makes no difference what you put in the but the real portion is zero.

Okay. And then the vector is basically the x coordinate, the y-coordinate and the zcoordinate. So you have a basically a four-dimensional vector. All right. So now let's let's just look at and we'll stop at that.

How do you do the first multiplication? So remember it's this is a sandwich product. So you're going to take this first quatnian and multiply it by the point. So I'm going to do that. And here's where it comes in by making a grid where I've got the real portion and then the I, the J, and the K of the quatronian. And I'm going to multiply by the real portion I J K of the point.

And this is where I'm going to try to do a better job. Now we come to that what we were teaching the kids in third and fourth grade that we split this number up not into tens and ones and hundreds but into basically fundamentally three different numbers that we can now multiply by a real time a real to get a real a real time an i to get an i direction a real time a j to get a J direction or real time a K to get a K direction. That's the easy one. Or real * I is I and real time J is J and real time K is K is here or real time real time I am I doing this right? real I J K real I J K I was wrong in this I times I is also a real J * J is also a real and K * K is also a real so you kind of fill all these things in and what comes out basically is another quatnian now what doesn't exist here is all those crazy diagonal numbers and I think we can maybe start to start to agree to agree on it complexifies a really important concept of breaking a number up into its individual constituents when you put those crazy shoots and ladders down the diagonals. And so either adding a step or always showing the importance that you don't always have to kind of put these crazy shoots and ladders to really think about breaking a number up into its components and doing the multiplication.

All right. So in the next video we'll come back and actually do a calculation of how you take a figure out what the axis is and then from that axis come up with a quatnian based on a particular spin. And remember, we don't want to forget that this is alpha over two. The way this works is kind of interesting, fascinating, and I can't say that I understand it, but this is how you get a robot arm to kind of figure out exactly where to go from one spot to another. That's the best way I guess I can describe it.

So, we're going to describe the quatian by the cosine of alpha over two as the real portion and the imaginary portion being a threedimensional vector. that is the sign of alpha / 2 times the unit vector of the axis of spin. That's the quatronian of the rotation. The point will be described by zero. Kind of odd how that works that way.

And then x, y, and z will be the imaginary components in the i, j and k direction. And that kind of goes along with convention of the unit vector in the i, j and k directions. Those things together will get us to the point where we can do four-dimensional math by learning to use the lattice method. And finally, I'll take you out to basically a a basic function in Ruby that shows you you probably will never do that once you understand how it's going on because basically it's been programmed. Anyway, thanks for listening.