POV-Ray : Newsgroups : povray.general : Averaging transforms : Re: Averaging transforms Server Time
31 Jul 2024 02:19:28 EDT (-0400)
  Re: Averaging transforms  
From: TheOzule
Date: 15 Jan 2008 05:35:00
Message: <web.478c8b558a8039755794a5f20@news.povray.org>
"scott" <sco### [at] laptopcom> wrote:
> Also if you are going to calculate your rotations from applied forces and
> torques then using quaternions makes matters much simpler.

Sorry to throw a potential proverbial spanner (Am. wrench) in the works but it
does depend on what you mean by 'average'.

Say you wanted a smooth pan across a scene and you're using the 'average
transform' to transform the camera. Then clock*T1 + (1-clock)*T2 works.  But
this will pan at an even speed.  Often what is required is a build-up of speed,
then constant speed, then an ease down into the final position.  At very least
this requires some more fancy work on clock before using it in the above (a
sine**2 function over 90 degrees is a start, but not a very good one).

But consider a transform of a camera that gives the same effect as an object
rotating on a pedestal.  Say the rotation is 90 degrees.  A linear
interpolation will cause the camera to move along the chord joining the first
and last points, not round the arc.  Fine if that's what you want, but it often
isn't.

This in general is also true of transforms of visible objects.

It really depends on the intermediate transforms you want to go through, so is
much more akin to a spline than a straight line.  I wrote a whole load of
macros for a previous ray tracing system (Rayshade) that I used for years of
doing scientific animation, and will see whether I can dig them out and change
them from C pre-processor code into POVray macros.

Cheers

Chris


Post a reply to this message

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