POV-Ray : Newsgroups : povray.off-topic : discrete torque : Re: discrete torque Server Time
28 Jul 2024 12:21:35 EDT (-0400)
  Re: discrete torque  
From: Le Forgeron
Date: 25 Feb 2014 07:28:24
Message: <530c8c68$1@news.povray.org>
Le 25/02/2014 10:14, scott a écrit :
>> From all your transformations (R & T), you compute the combination of
>> them all (M = R.T, if you apply first the rotation then the
>> translation), then you can use a linear interpolation to have the
>> various steps at constant momentum: for k between 0 and 1, the
>> transformation is k.M
> 
> The problem is you can't take a linear interpolation of a rotation
> matrix and get a valid result.

Yep, my bad.

you just need a valid interpolation between the identity matrix and the
final transform matrix... which might take some sweat but is doable, as
long as you restrict yourself to rotation and translation. (as long as
the matrix is for a rigid transformation)

Computes the axis of final rotation and the final angle.
Apply the linear interpolation on the translation matrix, and generate a
rotation matrix for the same axis and an interpolated angle.
Everything in quaternion, of course (and stay away from Euler angles).

Interesting reading:
http://graphics.ucsd.edu/courses/cse167_f05/CSE167_03.ppt

and

http://www.inf.ethz.ch/personal/lballan/pdfs/RigidTransformations.pdf

-- 
Just because nobody complains does not mean all parachutes are perfect.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.