Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actualcr88192

Posted 15 May 2013 - 01:35 PM

FWIW: one trick I had used before for interpolating matrices directly was to identify a common rotation axis, and then rotate all of the vectors in the matrix (as points) along this axis.

typically this axis was found/approximated by finding which unit axis changed the least during the movement, interpolating this axis (by treating it as an arc along the plane formed by its 2 positions and the origin), and then using this interpolated axis to rotate the matrix by (trying to rotate the source-matrix into the destination matrix).

(there may be better ways to calculate this axis though).

the math gets hairy, and there may be a better and more accurate ways to do this, but in my uses it seemed to work ok (much better than linearly interpolating them at least...).

(I can imaging a few ugly hacks though to possibly boost accuracy, but decided against elaborating on them).

#2cr88192

Posted 15 May 2013 - 01:35 PM

FWIW: one trick I had used before for interpolating matrices directly was to identify a common rotation axis, and then rotate all of the vectors in the matrix (as points) along this axis.

typically this axis was found/approximated by finding which unit axis changed the least during the movement, interpolating this axis (by treating it as an arc along the plane formed by its 2 positions and the origin), and then using this interpolated axis to rotate the matrix by (trying to rotate the source-matrix into the destination matrix).

(there may be better ways to calculate this axis though).

the math gets hairy, and there may be a better and more accurate ways to do this, but in my uses it seemed to work ok (much better than linearly interpolating them at least...).

(I can imaging a few ugly hacks though to possibly boost accuracy, but decided against elaborating on them).

#1cr88192

Posted 15 May 2013 - 01:12 PM

FWIW: one trick I had used before for interpolating matrices directly was to identify a common rotation axis, and then rotate all of the vectors in the matrix (as points) along this axis.

 

typically this axis was found/approximated by finding which unit axis changed the least during the movement, interpolating this axis (by treating it as an arc along the plane formed by its 2 positions and the origin), and then using this interpolated axis to rotate the matrix by (trying to rotate the source-matrix into the destination matrix).

 

the math gets hairy, and there may be a better and more accurate ways to do this, but in my uses it seemed to work ok (much better than linearly interpolating them at least...).

 

(I can imaging a few ugly hacks though to possibly boost accuracy, but decided against elaborating on them).


PARTNERS