N = 5;
imagetime = 1.8; //time for a single image to be displayed
forall(0..N-1,
createimage("tree"+#, 600, 600); //supersampling
);
forall(0..1,
createimage("out"+#, 600, 600);
);
it = 1;
o1(it) := "tree" + mod(it - 1, N);
o2(it) := "tree" + mod(floor(it - 2 - (N-3)*random()), N);
rp() := ((random(), random()) - (.5, .5))*.25;
L = (-3,-2.5);
R = (3,-2.5);
lastsecond = -1;
cnt = 0;