密集分布的问题

密集分布的问题

在此处输入图片描述这是什么poisson.sty?我该如何解决这个问题,因为我想运行下面的代码,但是出现错误(poisson.sty未找到)

\documentclass{article}
\usepackage{tikz}
\usepackage{poisson}
\begin{document}
\edef\mylist{\poissonpointslist{5}{5}{0.1}{20}}  % very dense, very slow
\begin{tikzpicture}
     \clip (0,0) rectangle (5,5);
     \foreach \x/\y in \mylist {
       \fill (\x,\y) circle(1pt);
     }
     \draw[very thick] (0,0) rectangle(5,5);
\end{tikzpicture}
\tikzset{
    bubble/.pic = {
       \fill[top color=blue!50!cyan!40!white, bottom color=blue!40!black] circle(0.1);
       \fill[white] (110:0.06) circle(0.02);
    }
}
\edef\mylist{\poissonpointslist{5}{5}{0.2}{15}}  % Dense slow
\begin{tikzpicture}
     \clip (0,0) rectangle (5,5);
     \fill[top color=blue!60!cyan, bottom color=blue!70!black] (0,0) rectangle (5,5);
     \foreach \x/\y in \mylist {
       \pgfmathsetmacro{\size}{0.5+0.5*rnd}
       \path (\x,\y) pic[scale=\size]{bubble};
     }
     \draw[very thick] (0,0) rectangle(5,5);
\end{tikzpicture}
\end{document}

相关内容