POV-Ray : Newsgroups : povray.general : arrays and animations : arrays and animations Server Time
30 Jul 2024 22:22:11 EDT (-0400)
  arrays and animations  
From: kike
Date: 8 May 2008 07:05:01
Message: <web.4822dd51f812a232be7bfb550@news.povray.org>
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!!!!


Post a reply to this message

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