POV-Ray : Newsgroups : povray.general : arrays and animations : Re: arrays and animations Server Time
30 Jul 2024 22:25:03 EDT (-0400)
  Re: arrays and animations  
From: Jan Dvorak
Date: 8 May 2008 08:30:17
Message: <4822f259$1@news.povray.org>
kike napsal(a):
> I still go on with my animation and I've got another question.
> 
> I want to use the function trace in an animation. The thing is that I want to
> calculate the intersection between one object and 10.000 spheres. This costs a
> lot but I need to do it just once (I mean, that all the frames will use the
> same trace results).
> 
> So I thought it would be a good idea to declare an array with all the trace
> results like
> 
> #declare P[i]=trace...
> 
> but as I just need to do this once I thought this would work:
> 
> #declare P=array[dim]
> 
> #if (frame_number=1)
> #while (i<dim)
> P[i]=trace...
> #end
> #end
> 
> and then use the value of P[i] for the rest of the animation. But it seems not
> to work. From one frame to another it doesnt save the array.
> 
> Can you think of a solution without writting an external file with the values of
> P[i]
> 
> Thanks in advance!!!!
> 
> 
no information is stored between individual frames except for what you 
save by yourself. Thus the only alternatives would be more complicated 
and impractical (I can think of some incomplete solutions and other 
ideas - one of each).


Post a reply to this message

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