POV-Ray : Newsgroups : povray.newusers : Using rand(); clear howto! : Re: Using rand(); clear howto! Server Time
5 Sep 2024 08:20:42 EDT (-0400)
  Re: Using rand(); clear howto!  
From: Simon Lemieux
Date: 10 May 2001 23:39:05
Message: <3AFB276D.D0B36405@yahoo.com>
> You are not only seeding the random number generator within the loop,
> you are seeding it *for every call*. You need to create one stream and
> use it.

Hmmm, I see I got confused by the documentation that used different seed
streams...  This is very simple and I got it now!

> (And some general advice, always use at least one capital letter in
> variable names, to avoid possible conflict with future features...and
> indent!)

Good advice, I might not use it though, I'm used to 'i' and 'n' that way,
although I like nSegments, nPolygons, mVertex, etc...
As for indentation... that was just a sketch... ;)

Thanks a lot Chris!
	Simon

-- 
+--------------------------------+---------------------------+
| Simon Lemieux                  | http://666Mhz.myip.org/   |
| Email : lem### [at] yahoocom | Povray and OpenGL Gallery |
+--------------------------------+---------------------------+


Post a reply to this message

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