POV-Ray : Newsgroups : povray.animations : Multi stage animations : Re: Multi stage animations Server Time
28 Jul 2024 18:18:20 EDT (-0400)
  Re: Multi stage animations  
From: Martin Magnusson
Date: 18 Mar 1999 05:30:23
Message: <36F0D0EC.4B995C83@student.uu.se>
Paul Blake wrote:
> 
> Please can you offer some help on this problem, I have explored allmost all
> resouces available to me.
> here is a simple animation which will rotate a ball on first the X axis and
> then the Y axis, no problem so far.
> I want to create a multi stage animation with more than just 2 stages for
> example:
> 
> Stage 1, rotate ball on the X axis
> Stage 2, rotate ball on the Y axis
> Stage 3, rotate ball on the Z axis
> Stage 4, rotate ball on combinations of the ubove

I usually use a #switch statement to make the different "stages" of the
animation - something like this (and I usually let each clock unit be
equivalent to one second):

#switch (clock)
  #range (0, 1)
  /* First part */
    #declare Clock = clock; 
    /* Everything in the scene uses Clock in stead of clock,
     * so that I can play around with the clock value. */
    #declare BallRot = <Clock*200, 0, 0>
    /* Rotate the ball 200 degrees during the first second */
  #break
  #range(1, 2)
    #declare Clock = clock - 1;
    /* Clock again runs from 0 through 1 */
    #declare BallRot = <1*200, Clock*150, 0>
    /* The ball was rotated x*200 before, now rotate it 150 degrees
     * around the y axis. */
  #break
  /* ...part 3 inserted here... */
  #range (3, 4.1) 
  /* You should make the end of the interval a bit larger, otherwise
   * the final frame may not be rendered correctly. */
  #break
#end

You could also have a look at the scene files for my entries in the IRTC
animation rounds - Four Seasons in the Oct-Jan '98 round, and Revenge od
the Dragon Lord in the Apr-Jul '98 round.

Good luck!

-- 
Martin Magnusson
Mar### [at] studentuuse
http://www.geocities.com/SoHo/9946/


Post a reply to this message

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