How to randomize points in a given area?

Hi, Hans, In your "metapost graphics" pdf document, I can find a card which randomizes points in a path of Christmas tree, how to do that? thanks. Yue Wang

Am 15.11.2008 um 04:10 schrieb Yue Wang:
You could try to make something with this example code. \setupcolors[state=start] \starttext \startMPpage[offset=1cm] for i=1 upto 5000: v := uniformdeviate(100) + 1 ; h := uniformdeviate(v) / 5 * normaldeviate ; l := uniformdeviate(5) ; draw ((-l,0)--(l,0)) rotated uniformdeviate(180) shifted (h,-v) withcolor transparent(1,.5,green) ; endfor \stopMPpage \stoptext Wolfgang

Yue Wang wrote:
just use 'uniformdevisate' or metafun operators like 'ramdomized' ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------

Yue Wang wrote:
if i remember right, by following the path of the tree ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Wolfgang Schuster
-
Yue Wang