POV-Ray : Newsgroups : povray.newusers : trying to animate with the color_map : Re: trying to animate with the color_map Server Time
28 Jul 2024 12:30:32 EDT (-0400)
  Re: trying to animate with the color_map  
From: The FD
Date: 20 Mar 2009 10:00:00
Message: <web.49c3a018e1f54028d3bf6faf0@news.povray.org>
Thank you to both of you that really helped.
I finally picked up the following:

#declare Sv = array [100];
#declare Sa = array [100];

#fopen data "data_essai.txt" read
#local i = 0;
#while (defined(data))
  #read (data,Var1,Var2)
  #declare Sa[i] = Var1;
  #declare Sv[i] = Var2;
  #local i = i+1;
#end
#fclose data


#debug concat("Sv: ",str(Sv[clock*10],1,2),"\n")
#debug concat("Sa: ",str(Sa[clock*10],1,2),"\n")

//and then in the object the color goes:

  pigment {
    gradient x
    color_map {
      [0.00 rgbt <0,0,Sv[clock*10],0.7>]
      [1.00 rgbt <Sa[clock*10],0,0,0.4>]
    }
    scale 28
    translate <-14,0,0>
  }

Thanks again
and talk to you soon around


Post a reply to this message

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