POV-Ray : Newsgroups : povray.general : [help] Illegal random number generator error : Re: [help] Illegal random number generator error Server Time
10 Aug 2024 15:18:48 EDT (-0400)
  Re: [help] Illegal random number generator error  
From: Ron Parker
Date: 30 Nov 1999 09:32:29
Message: <3843dffd@news.povray.org>
On Tue, 30 Nov 1999 15:05:08 +0100, Philippe Debar wrote:
>// Illegal random number generator error
>
>camera{}
>light_source{0 color rgb 1}
>#declare testval=rand(5);
>
>/*
>I got a new and persistent error ("illegal random number generator") every
>time I try to use rand() with any seed but 0. Except 0, I found no seed that
>did not produce this error. Even this simplest scene generates it. As I had
>many installation/de-installation on my computer recently, I tried
>uninstalling an reinstalling POV - to no avail. Any hint?

Rand takes a special seed value as an argument.  It should be like this:

camera{}
light_source{0 color rgb 1}
#declare Seed = seed(5);
#declare testval=rand(Seed);

You may want to reread the documentation on rand() and seed().

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

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