POV-Ray : Newsgroups : povray.newusers : Can't Get Clock to Run to 2 : Can't Get Clock to Run to 2 Server Time
2 Nov 2024 09:17:30 EDT (-0400)
  Can't Get Clock to Run to 2  
From: CFM
Date: 3 Jun 2004 19:00:02
Message: <web.40bfad1e340593d668c1f7530@news.povray.org>
What I want to do is allow the sphere I created to roll from left to right,
then to sharply curve back toward the left and moving backward into the
background along the z plane. However, I can't get it to work. What is
wrong with the following POV-ray programming language that needs to be
corrected? If there's nothing wrong with that, then what did I do wrong?

#include "colors.inc"
camera {
  location <0,3,-6>
  look_at <0,0,0>
}
light_source {<20,20,-20>color White}
plane {
  y,0
  pigment {checker color White color Black}
}
#if (clock<=1)
sphere {
  <0,0,0>, 1
  pigment {
    gradient x
    color_map {
      [0 Blue]
      [.5 Blue]
      [.5 White]
      [1 White]
    }
    scale .25
  }
  rotate <0,0,-clock*360>
  translate <-pi,1,0>
  translate <2*pi*clock,0,0>
}
#else
//(if clock is >1, we're on the second phase)
//we still want to work with a value from 0 - 1
#declare ElseClock=clock-1;
sphere {<0,0,0>,1
  pigment {
    gradient x
    color_map {
      [0 Blue]
      [.5 Blue]
      [.5 White]
      [1 White]
    }
    scale .25
  }
  rotate <0,0,ElseClock*360>
  translate <-2*pi*ElseClock,0,0>
  rotate <0,45,0>
  translate <pi,1,0>
}
#end


Post a reply to this message

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