[pstricks] Randomly-Sized Drops with pst-marble

Juergen Gilg gilg at acrotex.net
Wed Feb 6 20:07:59 CET 2019


Dear Joel,

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.

Hope this helps.

Best,

Jürgen

Am 06.02.2019 um 17:38 Uhr schrieb Joel C. Salomon:
>
> The version 1.2 release of pst-marble replaces random-drops 
> with Gaussian-drops and uniform-drops, which provide very useful 
> control over where the drops are placed, but which lose the feature of 
> the drops having random size.
>
> Would replacing
>
>     0 0 1010 1010 0 (4691CB) 100 10 uniform-drops
>
> with something like
>
>     100 { 0 0 1010 1010 0 (4691CB) 1 random:uniform 2 mul 9
>     add uniform-drops } repeat
>
> be the right way to get this back? Or would I be better off trying to 
> define a variant of uniform-drops—and how would I do that?
>
> (I’m using 1010 so some drops are centered outside the image.)
>
> IIRC, random-drops used a Gaussian distribution for size, but I’m 
> reading pst-marble.pro <http://pst-marble.pro> and not understanding 
> PostScript well enough to adopt the code in random:normal2. Is the old 
> code available somewhere in a public repository?
>
> —Joel C. Salomon
>
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/

-- 
Jürgen Gilg
Austr. 59
70376 Stuttgart

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pstricks/attachments/20190206/9a1a7a91/attachment.html>


More information about the PSTricks mailing list