POV-Ray : Newsgroups : povray.general : Averaging transforms : Re: Averaging transforms Server Time
31 Jul 2024 02:23:07 EDT (-0400)
  Re: Averaging transforms  
From: Chris B
Date: 15 Jan 2008 11:23:27
Message: <478cddff$2@news.povray.org>
"gregjohn" <pte### [at] yahoocom> wrote in message 
news:web.478ccbf88a803975d30d1e600@news.povray.org...
> Just to restate, I have one transform that is, in effect,
>
> #declare First_Trans= transform{
> rotate foo1 translate bar1
> rotate foo2 translate bar2
> rotate foo3 translate bar3
> rotate foo4 translate bar4
> rotate foo5 translate bar5
> rotate foo6 translate bar6
> rotate foo7 translate bar7 }
>
> Imagine all the transformations a big toe or index digit has to go through 
> from
> the hip.  Up the spine, over to shoulder, etc. And then I've got one 
> transform
> that describes, as a function of clock, a walk cycle, and another a run.
>
> Now if all transforms are matrices, then I'm guessing a complicated 
> transform,
> too, is a matrix. Here's where it may be either incredibly stupid question 
> or
> trivial implementation (three lines of SDL or for inclusion in povray 
> 4.1).
>
> Can you simply average all of the components of two different transforms 
> and get
> either a meaningful or smooth transition?
>

Hi Greg,
Yes and No.  :-)

There's nothing that I'm aware of that would automatically do this for just 
any old transform or for your particular transformations once they're built 
up inside the transform statement.

It would, on the other hand, be possible to apply the two different 
transformations to a set of four points (centre and 3x axis normals) and 
create a macro that interpolates between the end results to give a single 
'scale', 'rotate', 'translate' transform - with the consequent problems of 
doing such a linear interpolation that Chris described (another Chris).

However, I would think that your particular problem is no more complex than 
the one I had in creating POV-Person a few years ago, which incorporates a 
macro that calculates an intermediary pose between two hand-coded poses. 
Thus the 'walking' animation at http://www.geocities.com/povperson/ only 
uses a small number of hand-coded poses and the rest are interpolated. It 
can also interpolate between sitting and standing etc, but does look a bit 
wooden if you don't add a few extra hand coded positions in between.

When writing that macro I assumed that the 'translates' don't make much 
difference because I wasn't expecting the distance between two joints to 
change between two poses, so it was just a matter of interpolating between 
the individual rotations (stored in an array) before building the final 
transformation for each body part.

Regards,
Chris B.


Post a reply to this message

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