that would give you a minus beta 2, but you're still doing a short rotation.

It's the quaternion that responds to the scalar part, which is, here, beta not.

That was always [INAUDIBLE] So here, if we want the short one,

we would pick the positive one.

Yes, Casey?

>> [INAUDIBLE] >> No, not really.

The reason I picked the positive one is because I just don't know and

the lack of knowledge.

So, in this case these I don't know if I pick a positive or negative,

I'm not going to be guaranteed a short or long.

Without looking at this one as a result of that choice I can't make

that determination.

So for this modified one don't spend a lot of time

dreading over positive and negative.

Just encoding people to pick the positive one, right it's a valid description.

And we're not going to finish this method and at the end I can look at my beta and

not the scale one and see if I picked the long or short, if it is long, I flip them.

To give back the short rotation.

At this stage you don't have enough information to really determine that.

So I'm glad you guys made that distinction.

Don't pick beta 1, 2 and 3 to do long or short.

You can't pull that information from there.

So let's say beta 2 was the largest.

You do the math, do the square root.

And pick the positive one.

Just Because I don't know, so I'll make it easy, pick the positive one.

Here, you have to pick the three equations that have beta two,

which is this one, this one, and this one.

So, you divide this right hand side by beta two to get beta naught, all right.

You divide this equation by beta two and you end up with beta one.

And you divide this equation by beta two and you get beta three.

So in your code you end up with these if statements.

If this is the largest then I use these three,

if this is the largest I use this, this and this.

If beta one is the largest I would use this one and these two, and so forth.

Right.

Yes.

>> Do we pick the largest for numerical reasons?

>> Yes. >> Okay.

>> Yeah, because you have finite degree.

And especially if you're dealing with old five computers that only had

eight bits and other stuff, then you can start to really make a difference.

With 16 bits if you picked 0.4 or 0.6, it doesn't make much difference.

So just again people just go with the biggest.

Which one of those is the biggest?

I found the good big one, off I go.

That's it.

So, this is the step.

So, instead of just having one set of the trace, and

then taking three of these formulas, we end up kind of, the first step is find

the biggest quaternion squared, take the square root, just keep it positive.

Use the right three formulas to get the other three and now as a final step we can

check that we have the short rotation, if you want that.

If you don't care, the you either quarternion is correct.

That makes sense?

So this is Shepard's Method, this is typically what we use.

And that's whats coded up typically because now you're completely singularity

free, but it takes some logic thinking there to see get good conditioning,

and pick the right numbers and the right formulas to extract it.

These quaternions always exist.