\ animation - boxes bouncing off picture const numboxes=10; var xbox{numboxes},ybox{numboxes}, xincr{numboxes},yincr{numboxes}, i,picnum; procedure movebox(i); \ Move box i, bouncing off wall if needed begin xbox{i}:=xbox{i}+xincr{i}; if xbox{i}<10 then if xincr{i}<0 then xincr{i}:= -xincr{i}; if xbox{i}>490 then if xincr{i}>0 then xincr{i}:= -xincr{i}; ybox{i}:=ybox{i}+yincr{i}; if ybox{i}<10 then if yincr{i}<0 then yincr{i}:= -yincr{i}; if ybox{i}>290 then if yincr{i}>0 then yincr{i}:= -yincr{i}; end; begin call cvclear; picnum:=1; call wait(2000); \ wait 2 secs for user i:=0; while i -1 do \ Continue while cursor over canvas begin call cvclear; call cvdraw(picnum,cvx-40,cvy-50,80,100); i:=0; while icvx-45 then if xbox{i}cvy-55 then if ybox{i}