POV-Ray : Newsgroups : povray.general : problem: repeating rand patterns using seed in animation : Re: problem: repeating rand patterns using seed in animation Server Time
30 Jul 2024 20:23:35 EDT (-0400)
  Re: problem: repeating rand patterns using seed in animation  
From: Nicolas George
Date: 25 Jan 2009 07:40:23
Message: <497c5db7@news.povray.org>
"Kenneth"  wrote in message
<web.497c4cb0b528db0df50167bc0@news.povray.org>:
> I made a slight mistake there (I forgot that the #while loop counter was
> starting at 0, not 1--which is how I usually start my own counters.)

I think you made two opposite mistakes:

while(i < n * 3)

is perfectly correct if i starts at 0, but would be wrong if i started at 1.

That is the reason why you should take the habit to start your loops at 0:
it makes most of the boundaries computations easier. (Although in this
particular case, changing < into <= would be enough).


Post a reply to this message

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