POV-Ray : Newsgroups : povray.binaries.images : seven arms : Re: seven arms Server Time
14 Nov 2024 10:16:03 EST (-0500)
  Re: seven arms  
From: Reactor
Date: 15 Aug 2009 14:55:00
Message: <web.4a870387fa341737fb6da2e10@news.povray.org>
"bgimeno" <bgimeno[at]persistencia[dot]org> wrote:
> While experimenting with the function rand () to simulate a random
> distribution of trees...

> #local Num_Tree = 0 ;
> #while (Num_Tree<1000)
>   #local rnd_tree = seed (Num_Tree);
>   #if (rand (rnd_tree)<.95 )
>     object {Tree
>             translate <50*rand(rnd_tree),0,0>
>             rotate y*360*rand(rnd_tree)
>             }
>    #end
>   #local Num_Tree = Num_Tree +1 ;
> #end
>


I don't understand the reason for this line, as it doesn't really do anything:
>   #if (rand (rnd_tree)<.95 )

The only effect is throw the count of trees off, since it pulls a number from
the stream, compares it, either places a tree or doesn't, but updates the
counter regardless.

-Reactor


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.