POV-Ray : Newsgroups : povray.animations : Object Movie - Macro?? : Re: Object Movie - Macro?? Server Time
28 Jul 2024 16:26:01 EDT (-0400)
  Re: Object Movie - Macro??  
From: Martin Crisp
Date: 5 Jul 1999 01:18:12
Message: <37804014@news.povray.org>
Ken wrote in message <378023DA.FE9A45BC@pacbell.net>...
>
>
>Martin Crisp wrote:
>>
>> Hi All,
>>
>> I've been working on a fairly simple task: Rotating an object in
'steps'
>> suitable for making object movie frames. I have it working to the
stage
>> where I could take it into a macro... My questions now are
>> essentially...
>>
>> Does such a thing already exist?
>> If not, anyone interested if I can get it happening?
>
>  I don't think I quite understand what the function of this is
supposed to
>perform. Could you please eleborate a little as to what one would
expect
>from such a macro function and how it would be better or similar to
just
>using the clock function inside translate and rotate functions.

OK,

Say I have an object that I want to make into an object movie... The
frames need to be at specific locations to achieve smooth rotation, and
the rotation may not be around the entire object in terms of either the
y or x axis.

If I want 30 columns and 10 rows, and I want the y rotation to be fully
360 degrees and to 'wrap' and want the x rotation to be 180 degrees and
not wrap...

I need the y rotational steps to be 360/cols
(Makes the actual arc 0-348 degrees for 30 columns, the 0 degree column
swaps in for the 360, same as 'standard' cyclic animation)

I need the x rotational steps to be 180/(rows-1)
(Makes the arc 0-180 degrees for 10 rows)

That's easy. But I also need to order the output frames to go into
whatever application I'm using to make the object movie. (I'm assuming
that they all allow 'vertical' order import...at this stage)

So I need to render (x0,y0), then (x1,y0),....,(x(rows-1),y0), (x0,y1),
(x1,y1),..., (x(rows-1),y(cols-1))

Which requires div-ing and mod-ing the frame number as well.

The biggest advantage is not having to do the math yourself (it isn't
that hard provided you pass an integer for the frame number, but it's
error prone - which is the best reason there is for a Macro....).

I have it working, if no-one else wants it then I won't bother making it
into a macro, if someone else does want it, I'll tidy it up.... (I'm at
work at the moment so don't have the source at hand)

Have Fun
Martin
--
<Spa### [at] tesseractcomau> is a valid address
If you prefer mnemonic addresses you can use:
<Martin 'at' tesseract.com.au> or <Martin.Crisp 'at' Tourism.tas.gov.au>

My opinions should not be taken as indicative of Tourism Tasmania's
opinions


Post a reply to this message

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