print <<END;
set terminal povray
set dummy u,v
set samples 100
set isosamples 100
set zrange [-1:1]
sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)

END

for($i=0; $i<50; $i+=2){
    $range= 5.0+$i*0.3;
    $pos= -9+$i*0.2;
    $num= sprintf("%03d",$co++);
    print <<END;
set out "tmp.pov"
splot [-$range:$range] [-$range:$range] sinc(u,v) with dots, "<echo '15 -5 $pos'" with points pt 99 ps 7
set out
! sed  's/[/][/]color_definition/#declare Pcolor99 = material{texture{pigment{color rgb<0.3, 0.3, 1>}finish{phong 0.8 ambient 0.05}}}/' tmp.pov > tmp1.pov
! povray +A0.1 +FC +I tmp1.pov +O tmp$num.tga

END
}


for($i=50; $i>0; $i-=2){
    $range= 5.0+$i*0.3;
    $color= 0.3 + (50-$i)*0.01;
    $num= sprintf("%03d",$co++);
    print <<END;
set out "tmp.pov"
splot [-$range:$range] [-$range:$range] sinc(u,v) with dots, "<echo '15 -5 1'" with points pt 99 ps 7
set out
! sed  's/[/][/]color_definition/#declare Pcolor99 = material{texture{pigment{color rgb<$color, 0.3, 1>}finish{phong 0.8 ambient 0.05}}}/' tmp.pov > tmp1.pov
! povray +A0.1 +FC +I tmp1.pov +O tmp$num.tga

END
}


