[pstricks] problem with random number generation?
Goebel, Juergen, OPE26
juergen.goebel at eads.com
Fri Nov 12 08:45:35 CET 2004
Hi,
Please have a look at the following sample. The result
isn't exactly what I've expected. There should be
something wrong, but I can't see what it is. Your help
would be appreciated.
Regards,
Jürgen
% two-dimensional uniform distribution
\documentclass{scrartcl}
\usepackage{pst-all}
\begin{document}
\pstVerb{%
rrand srand % initializes the random generator
/k 20 def
}%
\psset{unit=1mm}
\begin{pspicture}(-20,-20)(20,20)
\psframe(-20,-20)(20,20)
\psplot[plotpoints=1000,showpoints=true,
dotsize=1pt,linestyle=none]{0}{0}{%
rand 2147483647 div 0.5 sub 2 mul
k mul
exch
rand 2147483647 div 0.5 sub 2 mul
k mul
}
\end{pspicture}
\end{document}
Mit freundlichen Grüßen
Jürgen Göbel
OPE26
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20041112/a95e22c7/attachment.html
More information about the PSTricks
mailing list