POV-Ray : Newsgroups : povray.binaries.animations : Some more dominos : Re: Some more dominos Server Time
6 Oct 2024 05:36:48 EDT (-0400)
  Re: Some more dominos  
From: Ralf Jonas
Date: 27 Nov 2004 07:02:36
Message: <opsh4g2yid029eka@hennes.sytes.net>
Hi,

> How did You animate Your camera, by a spline, by simple translate and
> rotate, or did You used the autoclock macro from Chris Colefax ?

Well, I did it the hard way. ;-) Sorry, it's my first animation ever.

camera {
   #switch(time_step)
     #range (0, 32.4999999)
         #local winkel = time_step / 64 * PI;
         #local xpos = -1.0 + time_step * .03;
         #local ypos = 0.30 + sin(winkel) * 0.472;
         #local xview = xpos + 0.1;
         #local yview =0.30 + sin(winkel + 0.1) * 0.472;
         location  <xpos,  0.06, ypos>
         look_at   <xview, 0.02, yview>
         #declare bahn1_x = xpos;
         #declare bahn1_y = ypos;
     #break
     #range (32.5, 46.499999)
         #local bahn1_x = -1.0 + 32 * .03;
         #local bahn1_y = 0.30 + sin(32 / 60 * PI) * 0.472;
         location  <bahn1_x + (time_step-32) * .03,  0.06 - ((time_step-32)  
/ 14 * 0.04), bahn1_y>
         look_at   <bahn1_x + 0.1 + (time_step-32) * .03, 0.02, bahn1_y>
     #break
     #range (46.5, 55.4999)
         #local bahn1_x = -1.0 + 32 * .03;
         #local bahn1_y = 0.30 + sin(32 / 60 * PI) * 0.472;
         location  <bahn1_x + (time_step-32) * .03,  0.02, bahn1_y>
         look_at   <bahn1_x + 0.1 + (time_step-32) * .03, 0.02, bahn1_y>
     #break
     #range (55.5, 61.499999)
         #local bahn1_x = -1.0 + 32 * .03;
         #local bahn1_y = 0.30 + sin(32 / 60 * PI) * 0.472;
         location  <bahn1_x + (time_step-32) * .03,  0.02 + ((time_step-55)  
/ 6 * 0.04), bahn1_y>
         look_at   <bahn1_x + 0.1 + (time_step-32) * .03, 0.02, bahn1_y>
     #break
     #range (61.5, 68.455555)
         #local bahn1_x = -1.0 + 61 * .03;
         #local bahn1_y = 0.30 + sin(32 / 60 * PI) * 0.472;
         #local winkel = (time_step-61) / 14 * PI;
         #local xpos = bahn1_x + sin(winkel) * 0.1;
         #local ypos = bahn1_y - (1-cos(winkel)) * 0.2;
         location  <xpos,  0.06, ypos>
         look_at   <xpos + cos(winkel) * .1, 0.02, ypos + sin(winkel) * .1>
     #break
     #range (68.5, 90.455555)
         #local bahn1_x = 0.93;
         #local bahn1_y = 0.56;
         #local xpos = bahn1_x;
         #local ypos = bahn1_y - (time_step-68) * .02;
         location  <xpos,  0.06, ypos>
         look_at   <xpos,  0.02, ypos + .1>
     #break
     // etc. etc. etc.
   #else
     #error str(time_step, 10, 5)
   #end
   angle 70
}


Post a reply to this message

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