[categories] [index] [all (553)] [latest]
Run with gs anim.ps
/W 320 def /H 240 def /R 15
/x 100 def /y 50 def def /x_ 2 def /y_ 1 def
<< /PageSize [W H] >> setpagedevice
{
% Clear
1 setgray 0 0 320 240 rectfill
% Draw
x R sub 0 lt x R add W gt or { /x_ x_ -1 mul def } if
y R sub 0 lt y R add H gt or { /y_ y_ -1 mul def } if
/x x x_ add def /y y y_ add def
newpath x y R 0 360 arc 1 0 1 setrgbcolor fill
10 10 moveto 0 setgray
flushpage
% Sleep
1000000 {} repeat
} loop