|
![](/i/fill.gif) |
In article <web.3e00bfe092e939f7f765b2b40@news.povray.org>,
"BlackRose" <nomail@nomail> wrote:
> But now I'm confused. I apologize for bothering you about this, but the
> documentation wasn't very clear/understandable to me, so I was wondering
> when and to what extent reusing variable names is acceptable, and how that
> relates to what is going on when I define and use macros and/or other
> objects. (Did that make sense ?)
Look up the documentation on local variables.
> Also, if I call the macro repeatedly, does the random number
> generator i'm using within the macro get reset each time ? What
> exactly goes on with the different rand-number streams when I seed
> it, and later call em ?
I don't see why it is so confusing...you call seed() to set up a stream.
If you do that in the macro, it gets done every time the macro is
called, just like any other code in the macro. It isn't wrong, but it is
almost definitely not what you want: you will always get the same string
of numbers from a given seed value.
What you want to do is to define the stream once and then leave it alone.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |