|
|
"Jay" <pjy### [at] gmailcom> wrote:
> #declare numofpic = 100;
> #declare shift = 1;
>
> #declare X=numofpic;
>
> #declare X5=array [X] { #for (i,0,numofpic^(1/2)[,shift]) i*shift, #end};
>
> #declare Cam3 = camera {
> location <30,25-Y5[frame_number],5+X5[frame_number]>
> look_at <0,10-Y5[frame_number],5+X5[frame_number]>
> }
>
> i don't care about the Y5,i think i can do that by myself if i knew how to make
> X5.
>
> X5 is like there should be 'numofpic' of numbers. for example
> if numofpic is 100 and shift is 1,
>
> X5 is like
>
{1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,```,10,10,10,10,10,10,10,10,10,10};
>
> idk how to put the #for to array structure. plz help me. i appreciate.
So, it looks to me like you just want to populate your array with sets of 10
integers.
#declare N = 10;
#declare S = 1;
#declare X5 = array [101];
#for (Block, 0, N-1, S)
#for (Val, 1, 10)
#local Position = (Block*10)+Val;
X5[Position] = Block;
#end // end for Val
#end // end for Block
That ought to give you the general idea.
You can adapt this to use your total frame numbers and square root method, and
compactify it a bit by deleting the separate #local declaration, and embedding
the nested for-next loops _inside_ the array[N]{} declaration.
Post a reply to this message
|
|