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
|