[pstricks] Randomly-Sized Drops with pst-marble

Joel C. Salomon joelcsalomon at gmail.com
Wed Feb 6 20:40:48 CET 2019


On Wed, Feb 6, 2019 at 2:08 PM Jürgen Gilg <gilg at acrotex.net> wrote:

> you could do something like that:
>
>     150{rand srand
>     /n {rrand 360 mod} def
>      n sin 350 rrand 200 mod sub mul
>       n cos 350 rrand 200 mod sub mul
>       rrand 25 mod 5 add
>       [0.98 0.89 0.56] drop
>     } repeat
>
> So you can generate flexible radii and flexible coordinates.
>
Thanks.

I actually found versions 0.1, 1.0, & 1.1 of the package on the TeXLive SVN
repository, which helped. What I did was create a file pst-marble-extra.pro
and included it with \pstheader. I defined /uniform-random-drops as a copy
of /uniform-drops (from pst-marble.pro) but replaced `drad` in the drop
command with `e random:uniform exp drad mul` (taken from version 1.1’s
/random-drops). That lets me reuse the command.

Now I’m going to let a compilation run for a couple hours, trying to
emulate a “stone” pattern….

—Joel C. Salomon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pstricks/attachments/20190206/895719d7/attachment.html>


More information about the PSTricks mailing list