POV-Ray : Newsgroups : povray.newusers : Generating animation : Generating animation Server Time
26 Apr 2024 05:56:42 EDT (-0400)
  Generating animation  
From: Aj
Date: 9 Feb 2023 16:20:00
Message: <web.63e5624cb2eea043acf42d723d902b29@news.povray.org>
Hi everyone,

I really appreciate that you take a moment from your important time to resolve
our issues.

I am trying to animate an oscillating beam and this is what i wrote:

#declare time = 0;

#declare oscillation = sin(time);

camera {
  location <0, 0, 20>
  look_at <0, 0, 0>
}

light_source {
  <10, 10, 20>
  color rgb <1, 1, 1>
}

background { color rgb <0.8, 0.9, 1> }

box {
  <0, -1, 0>, <2, 1, 0.2>
  texture {
    pigment { color rgb <0.7, 0.7, 0.7> }
    finish { ambient 0.2 diffuse 0.8 }
  }
}

cylinder {
  <0, 0, 0>, <0, 0.1+5 * oscillation, 0>, 0.1
  texture {
    pigment { color rgb <0.9, 0.2, 0.2> }
    finish { ambient 0.2 diffuse 0.8 }
  }
}

animation {
  camera {
    rotation 0
    location <0, 0, 20>
    look_at <0, 0, 0>
  }
  clip {
    frames 200
    fps 30
    input_file_name "oscillation-#.pov"
    output_file_name "oscillation-#.png"
    render_image_size <600, 600>
    #declare time = clock;
    #declare oscillation = sin(2*pi*time);
  }
}

I get an error in the animation saying it is not a directive. I am using POV-Ray
3.7 on windows 10

Any suggestion would be really helpful


Post a reply to this message

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