Jump to content
  • Advertisement
Sign in to follow this  
JohnnyCode

slerp of two pairs of vectors

This topic is 847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If there are two unit orthogonal vectors A and B, and they slerp to two orthogonal unit vectors C and D, indivdualy but by the same factor value, do they preserve the orthogonality on entire way?

 

I cannot imagine it well enough to provide me a decision, weather positive or negative, so I try to state a proof to , but I am not sure, here it would be:

 

A . B=1 and C . D=1 , is A1 . B1 =1 for all t<0.0,1.0> if

A1=sin((1-t)*h)/sin(h)*A+sin(t*h)/sin(h)*C;

B1=sin((1-t)*j)/sin(j)*B+sin(t*j)/sin(j)*D;

h=acos(A . C)

j=acos (B . D)

 

Please, help me crack this proof/statement.

Edited by JohnnyCode

Share this post


Link to post
Share on other sites
Advertisement

I tend to think of SLERP as a rotation about a fixed axis of rotation, where the angle is linearly interpolated between 0 and the final angle.

 

It's not clear to me what you mean by the "same factor value", but I assume you mean that the angle between A and C is the same as the angle between B and D.

 

Without getting in to a mathematical proof, I would say that A and B only stay orthogonal if both of their SLERP's use the same axis of rotation.  I'm just coming to this conclusion by example. 

 

e.g., Example 1 -- all vectors in the same plane, A=(0,1,0), B=(1,0,0), C=(0,-1,0), D=(-1,0,0).  Both A and B go through a 180 degree rotation.  Since SLERP rotates them both at the same rate, at t=0.5 the will both be 90 degrees from where they started, and still be orthogonal.

 

Example 2 -- drastically different axes of rotation:  A=(0,1,0), B=(1,0,0), C=(1,0,0), D=(0,0,1).  In this case, A is rotating around the Z axis by 90 degrees and B is rotating around the Y axis by 90 degrees.  Without taking the time to prove this mathematically, you can do a finger-proof to demonstrate that you can't keep the vectors orthogonal while they are SLERPING.  just try to hold you thumb and forefinger stiffly at 90 degree angles (assume that the vectors remain orthogonal through the rotation), and you will see that as you SLERP vector A towards C, vector B cannot take the shortest path towards D.   Since SLERP takes the shortest path, this is a proof by contradiction.

Share this post


Link to post
Share on other sites
No, they do not. Imagine a situation where A=D and B=C (so the two vectors are just swapping roles). At t = 0.5 the two vectors will be the same.

Share this post


Link to post
Share on other sites

[...] do they preserve the orthogonality on entire way?


No, they do not. Imagine a situation where A=D and B=C (so the two vectors are just swapping roles). At t = 0.5 the two vectors will be the same.


[Hmmm... I tried to edit my post. How did it end up as a separate post?] Edited by Álvaro

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!