|
|
gregjohn wrote:
> Say I've got two different expressions or algorithms for defining a transform. I
> want to transition from one to the other very gradually as I proceed along a
> series of frames. Say a "walk" transform" going to a "run" transform.
>
> Can two different transforms be averaged together? I'm not sure if this would
> be trivial or impossible.
Generally, the best way to average two transforms is to extract the
scale, rotation, and translation transforms from each, interpolate the
results, and then recombine the interpolated values.
(This all assumes that there is no shearing element in the transforms.)
The scale transform you can either scale in a linear fashion:
s(x) = a+(b-a)*x
or an exponential fashion
s(x)=a* exp( ln(b/a)*x )
Try each to see which gives you the results you want.
The transform is easily interpolated:
t(x) = a+(b-a)*x
The rotation will probably be rather complex, and you may want to break
down the translation into the three axes first, interpolate between the
axes, and then recombine them.
Regards,
John
Post a reply to this message
|
|