|
|
|
|
|
|
| |
| |
|
|
From: Philippe Debar
Subject: [help] Illegal random number generator error
Date: 30 Nov 1999 09:18:01
Message: <3843dc99@news.povray.org>
|
|
|
| |
| |
|
|
// 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?
This scene produces:
<snip>
> Warning Stream to console.......On
> camera{}
> light_source{0 color rgb 1}
> #declare testval=rand(5) <----ERROR
>
> D:\POV\Ecran\randtest.pov:3: error: Illegal random number generator.
>
> Returned from renderer (non-zero return value)
POV version info:
v 3.1g.watcom/win32 (Pentium II optimized)
System info:
Microsoft Windows 98 4.10.2222 A
IE 5 5.00.2614.3500
PII 233MHz (GenuineIntel Pentium(r) II Processor Intel MMX(TM) Technology)
128MB RAM
*/
Post a reply to this message
|
|
| |
| |
|
|
From: Ron Parker
Subject: Re: [help] Illegal random number generator error
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
|
|
| |
| |
|
|
From: Philippe Debar
Subject: Re: [help] Illegal random number generator error
Date: 1 Dec 1999 04:51:15
Message: <3844ef93@news.povray.org>
|
|
|
| |
| |
|
|
> 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);
Ooops. That was the way I used it (with #local, not #declare to be precise),
but I simplified it too much while I was chasing for my mistake. I'll try
again this evening...
Post a reply to this message
|
|
| |
| |
|
|
From: Philippe Debar
Subject: Re: [help] Illegal random number generator error
Date: 2 Dec 1999 03:41:15
Message: <384630ab@news.povray.org>
|
|
|
| |
| |
|
|
Ron,
Thank you for putting me back on track so kindly. And not treating me like
the idiot I was. I do not know what went wrong with my mind. I mean: I use
rand() and seed() since they exist, a search on my HD for "seed(" reported
around 30 files I recently wrote myself, some no more than three weeks ago
(and few older because my HD is getting small, so I clean it frequently).
and yet this week I was unable to use it correctly. Were you to ask if I
read the doc I would have said "yes" without hesitation. Heck, I did before
posting. And reading your post, I did not understand what you wrote. I was
so sure I knew how to use rand(). Both with the doc and your post I
_skipped_ the seed() part. Unconsciously. I guess it's time I update _my_ OS
:-). Please, accept my apologise for being such a moron.
Thank you again.
Sincerely,
Philippe
Post a reply to this message
|
|
| |
| |
|
|
From: omniVERSE
Subject: Re: [help] Illegal random number generator error
Date: 2 Dec 1999 12:17:32
Message: <3846a9ac@news.povray.org>
|
|
|
| |
| |
|
|
If it's any consolation, and I'm sure it couldn't possibly be, forgetfulness
mistakes are a common occurance for me also.
<test>Quick--- What's the correct method of writing a checker pattern
pigment?</test>
Bob
Philippe Debar <phi### [at] hotmailcom> wrote in message
news:384630ab@news.povray.org...
> I do not know what went wrong with my mind. I mean: I use
> rand() and seed() since they exist, a search on my HD for "seed(" reported
> around 30 files I recently wrote myself, some no more than three weeks ago
> (and few older because my HD is getting small, so I clean it frequently).
> and yet this week I was unable to use it correctly.
Post a reply to this message
|
|
| |
| |
|
|
From: Mark Wagner
Subject: Re: [help] Illegal random number generator error
Date: 3 Dec 1999 01:45:14
Message: <384766fa@news.povray.org>
|
|
|
| |
| |
|
|
omniVERSE wrote in message <3846a9ac@news.povray.org>...
><test>Quick--- What's the correct method of writing a checker pattern
>pigment?</test>
Source code or POV script?
Mark
Post a reply to this message
|
|
| |
| |
|
|
From: Philippe Debar
Subject: Re: [help] Illegal random number generator error
Date: 3 Dec 1999 05:48:56
Message: <3847a018$1@news.povray.org>
|
|
|
| |
| |
|
|
omniVERSE wrote:
> If it's any consolation, and I'm sure it couldn't possibly be,
forgetfulness
> mistakes are a common occurance for me also.
>
> <test>Quick--- What's the correct method of writing a checker pattern
> pigment?</test>
That's easy: I am SURE I don't know!
I'll try nonetheless - just for fun
WARNING - GUESSWORK AHEAD
texture{pigment{ checker color rgb 1 color rgb 0}}
?
Philippe
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3846a9ac@news.povray.org>, "omniVERSE" <inv### [at] aolcom>
wrote:
> <test>Quick--- What's the correct method of writing a checker pattern
> pigment?</test>
If what you want is a pattern of 2 pigments:
texture {
pigment {checker
pigment {PigmentA}
pigment {PigmentB}
}
}
--
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|
| |
| |
|
|
From: Ron Parker
Subject: Re: [help] Illegal random number generator error
Date: 3 Dec 1999 08:19:47
Message: <3847c373@news.povray.org>
|
|
|
| |
| |
|
|
On Fri, 3 Dec 1999 10:48:31 +0100, Philippe Debar wrote:
>omniVERSE wrote:
>> <test>Quick--- What's the correct method of writing a checker pattern
>> pigment?</test>
>
>That's easy: I am SURE I don't know!
>I'll try nonetheless - just for fun
>
>WARNING - GUESSWORK AHEAD
>texture{pigment{ checker color rgb 1 color rgb 0}}
It's a trick question. There's a "gotcha" in the parser that makes it not
work without either a comma or the "color" token (as you have it.)
--
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
|
|
| |
| |
|
|
From: Philippe Debar
Subject: Re: [help] Illegal random number generator error
Date: 8 Dec 1999 03:45:53
Message: <384e1ac1@news.povray.org>
|
|
|
| |
| |
|
|
> It's a trick question. There's a "gotcha" in the parser that makes it not
> work without either a comma or the "color" token (as you have it.)
So I am right, since I was wrong (I knew I didn't)
:-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |