POV-Ray : Newsgroups : povray.newusers : Rotation then Translation inside an animation : Rotation then Translation inside an animation Server Time
14 May 2024 14:16:30 EDT (-0400)
  Rotation then Translation inside an animation  
From: Romain
Date: 1 Apr 2014 05:20:01
Message: <web.533a82fdeb8b8f69281b7210@news.povray.org>
Hello everyone,

I started to use POV-Ray to create some mesh animation. I'd like to make an
animation like this:
 - During the first 15 frames, make a rotation on Y-axis.
 - During the last 15 frames, make a translation on X-axis.

I did something like this:

mesh {
 .... //My triangles

#if (frame_number < 15)
   rotate < 0, clock*360, 0 >
#else
   translate < clock*5, 0, 0 >
#end
}

The problem with this, is that I don't save the state of the rotation so my
translation is done on the wrong state.

I tried to declare some variables (in .ini or .pov) but, like I though, their
values are resetting for each frames.

Can we save the previous transformation applied on one object?

Thank you.

Romain


Post a reply to this message

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