[pstricks] Large numbers in double multido and memory problems

Poul Riis Poul.Riis at skolekom.dk
Fri Nov 9 20:47:32 CET 2007

How can I increase the number of points in the double slit interference
pattern below without getting memory problems?
Any other improvements will be appreciated, too...

Poul Riis


\definecolor[ps]{bl}{rgb}{tx at addDict begin Red Green Blue end}

\multido{\iy=1+1}{50}{\multido{\ix=1+1}{60}{\pstVerb{/r1 \ix\space dup mul
\iy\space 35 sub dup mul add sqrt def /r2 \ix\space dup mul \iy\space 15
sub dup mul add sqrt def r1 10 div 360 mul sin r2 10 div 360 mul sin add 2
add 75 mul 379 add dup /lambda exch def tx at addDict begin wavelengthToRGB
end}\psframe*[linecolor=bl](!\ix\space 1 sub \iy\space 1 sub)(!\ix\space

More information about the PSTricks mailing list