POV-Ray : Newsgroups : povray.general : Bug in pseudo random? (gif 716b+) Server Time
15 Nov 2024 11:17:16 EST (-0500)
  Bug in pseudo random? (gif 716b+) (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Spider
Subject: Bug in pseudo random? (gif 716b+)
Date: 2 Feb 1999 11:18:38
Message: <36B7240F.665C19A0@bahnhof.se>
Well, I was playing around in pov, using rand() and seed() functions
when I found this little effect after using it a bit.

The original idea was to ues the Superpatch in a few aspects(place a lot
of sphres and use bouded_by from a text object, and thus get text made
out of bubbles, generally.) when this effetc appeared, I made some
changes, and switched to normal pov to see if it was still there. Sure
it was.

Well, this is the code for the scene :

camera { location<0,0,-10> look_at<0,0,0> }
light_source { <-50,150,-50> color rgb 1 }
light_source { <+50,150,-50> color rgb 1 }

union {
  #local Min = <0,-0.0286, 0>+0.1;
  #local Max = <10,1.6721,4.6715>-0.1;
  #local S = <seed(1), seed(2), seed(3)>;
  #local R = seed(4);
  #local N = 0;
  #while(N<10000)
    sphere {
      Min+(<rand(S.x),rand(S.y),rand(S.z)>*Max)
      (rand(R)*0.07)+0.03
    }
    #local N=N+1;
  #end
  translate -5*x
  pigment {colour rgb 1 }
  finish {ambient .8}
} 
At first I thought it was the #local S = <seed(1), seed(2), seed(3)>;
line that was in error, but no. This worked with other numbers, so the
error is in seed(1) seed(2) seed(3) generation. 

I just wonder if there is a limitation in the seed() function causing it
not to work with theese small numbers ???

If i used a a larger set of numbers, 666, 1999, 2010 3010 and so, it
worked nicely, but not here.

Attached is a .gif of the image, 2 colours.
I'm sorry about the image, but I thought it was small enough to be
attached here. *smile*

//Spider


Post a reply to this message


Attachments:
Download 'bug_2.gif' (1 KB)

Preview of image 'bug_2.gif'
bug_2.gif


 

From: Remco de Korte
Subject: Re: Bug in pseudo random? (gif 716b+)
Date: 2 Feb 1999 11:43:15
Message: <36B72941.78392E6D@xs4all.nl>
It happens with every series of seeds with regular intervals.
I tried it for instance with 1000,2000,3000 which gave a similar result. Then I
tried it with 1000,2001,3000 and lo and behold!
I gues this has something to do with the way seed() works but I wouldn't know
anything about that.
What I don't understand is why you should declare more then one seeds.
Isn't one enough? Anyway, look what happens when you use only one seed. I did
;-)
I guess this isn't really a bug, just a way to uncover that randomness in a
computer is often pseudo (as you mentioned).

Regards,

Remco


Spider wrote:
> 
> Well, I was playing around in pov, using rand() and seed() functions
> when I found this little effect after using it a bit.
> 
> The original idea was to ues the Superpatch in a few aspects(place a lot
> of sphres and use bouded_by from a text object, and thus get text made
> out of bubbles, generally.) when this effetc appeared, I made some
> changes, and switched to normal pov to see if it was still there. Sure
> it was.
> 
> Well, this is the code for the scene :
> 
> camera { location<0,0,-10> look_at<0,0,0> }
> light_source { <-50,150,-50> color rgb 1 }
> light_source { <+50,150,-50> color rgb 1 }
> 
> union {
>   #local Min = <0,-0.0286, 0>+0.1;
>   #local Max = <10,1.6721,4.6715>-0.1;
>   #local S = <seed(1), seed(2), seed(3)>;
>   #local R = seed(4);
>   #local N = 0;
>   #while(N<10000)
>     sphere {
>       Min+(<rand(S.x),rand(S.y),rand(S.z)>*Max)
>       (rand(R)*0.07)+0.03
>     }
>     #local N=N+1;
>   #end
>   translate -5*x
>   pigment {colour rgb 1 }
>   finish {ambient .8}
> }
> At first I thought it was the #local S = <seed(1), seed(2), seed(3)>;
> line that was in error, but no. This worked with other numbers, so the
> error is in seed(1) seed(2) seed(3) generation.
> 
> I just wonder if there is a limitation in the seed() function causing it
> not to work with theese small numbers ???
> 
> If i used a a larger set of numbers, 666, 1999, 2010 3010 and so, it
> worked nicely, but not here.
> 
> Attached is a .gif of the image, 2 colours.
> I'm sorry about the image, but I thought it was small enough to be
> attached here. *smile*
> 
> //Spider
> 
>   --------------------------------------------------------------------------------
>  [Image]


Post a reply to this message

From: Spider
Subject: Re: Bug in pseudo random? (gif 716b+)
Date: 2 Feb 1999 15:58:53
Message: <36B72F70.7F8C5B85@bahnhof.se>
Remco de Korte wrote:
> 
> It happens with every series of seeds with regular intervals.
ok, is that it. I guess i should have known :-) (After all, I'm
currently reading a thing on how to make pseudo random values, abd how
to prove that a random series isn't working with statistics...)

> I tried it for instance with 1000,2000,3000 which gave a similar result. Then I
> tried it with 1000,2001,3000 and lo and behold!
oki.

> I gues this has something to do with the way seed() works but I wouldn't know
> anything about that.
probably not the seed() but the rand().

> What I don't understand is why you should declare more then one seeds.
> Isn't one enough? Anyway, look what happens when you use only one seed. I did
> ;-)
Actually, I usually have one for each axis, because then there is less
difference If i add a random rotation around an axis or so. And, I think
it's better to use three random values instead of one, gives me a bit
better feeling about it, it's "more random" (I know I'm wrong, but,
whata heck :-)

> I guess this isn't really a bug, just a way to uncover that randomness in a
> computer is often pseudo (as you mentioned).
yup. I was just baffeld at the experience... (notice the ? in the header
;-)

//Spider


Post a reply to this message

From: Spider
Subject: Re: Bug in pseudo random? (gif 716b+) (UDP)
Date: 2 Feb 1999 15:59:00
Message: <36B7322B.B845A942@bahnhof.se>
More thoughts.
If this won't change(I doubt it will) then a note in the documentation
should note about this, and make the user aware of it. A thing for the
UDP ?

//Spider


Post a reply to this message

From: Remco de Korte
Subject: Re: Bug in pseudo random? (gif 716b+) (UDP)
Date: 2 Feb 1999 18:31:12
Message: <36B787C1.365DA2D2@xs4all.nl>
Spider wrote:
> 
> More thoughts.
> If this won't change(I doubt it will) then a note in the documentation
> should note about this, and make the user aware of it. A thing for the
> UDP ?
> 
> //Spider

Huh, or just stick to using one seed.
;-)

Remco


Post a reply to this message

From: Spider
Subject: Re: Bug in pseudo random? (gif 716b+) (UDP)
Date: 2 Feb 1999 19:24:49
Message: <36B79630.23AEB71@bahnhof.se>
Remco de Korte wrote:
> 
> Spider wrote:
> >
> > More thoughts.
> > If this won't change(I doubt it will) then a note in the documentation
> > should note about this, and make the user aware of it. A thing for the
> > UDP ?
> >
> > //Spider
> 
> Huh, or just stick to using one seed.
> ;-)


Nooo, that would defy the reason for having seeds, wouldn't it ?? 

//Spider


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Bug in pseudo random? (gif 716b+) (UDP)
Date: 2 Feb 1999 20:52:37
Message: <36b8ab2c.102296086@news.povray.org>
On Tue, 02 Feb 1999 18:13:15 +0100, Spider <spi### [at] bahnhofse> wrote:

>More thoughts.
>If this won't change(I doubt it will) then a note in the documentation
>should note about this, and make the user aware of it. A thing for the
>UDP ?

Aaaahhh!

A peek inside parkrrrr's mind while he tries to decode the characters
"UDP"...

"Usenet Death Penalty"  nope, that's not it.
"User Datagram Packet"  nope, not it either.
what could it be?  Oh, yeah, "User Documentation Project."

Can we come up with a different TLA?  That one's already been
overused.  :)


Post a reply to this message

From: Spider
Subject: Re: Bug in pseudo random? (gif 716b+) (UDP)
Date: 2 Feb 1999 20:59:53
Message: <36B7AC78.1460C0C8@bahnhof.se>
Not my idea, dont' blame me!!! (Scared scream as he jumps for cover)

sure thing, change it, do it, do it !!!!

//Spider

"Ronald L. Parker" wrote:
> 
> On Tue, 02 Feb 1999 18:13:15 +0100, Spider <spi### [at] bahnhofse> wrote:
> 
> >More thoughts.
> >If this won't change(I doubt it will) then a note in the documentation
> >should note about this, and make the user aware of it. A thing for the
> >UDP ?
> 
> Aaaahhh!
> 
> A peek inside parkrrrr's mind while he tries to decode the characters
> "UDP"...
> 
> "Usenet Death Penalty"  nope, that's not it.
> "User Datagram Packet"  nope, not it either.
> what could it be?  Oh, yeah, "User Documentation Project."
> 
> Can we come up with a different TLA?  That one's already been
> overused.  :)


Post a reply to this message

From: Mike
Subject: Re: Bug in pseudo random? (gif 716b+) (UDP)
Date: 2 Feb 1999 23:28:06
Message: <36B7CF8D.B4A4C823@aol.com>
How about calling it the YKYBRTLWYCAPFMAUDTIMTTTOTCWTP?

-Mike

Ronald L. Parker wrote:
> 
> On Tue, 02 Feb 1999 18:13:15 +0100, Spider <spi### [at] bahnhofse> wrote:
> 
> >More thoughts.
> >If this won't change(I doubt it will) then a note in the documentation
> >should note about this, and make the user aware of it. A thing for the
> >UDP ?
> 
> Aaaahhh!
> 
> A peek inside parkrrrr's mind while he tries to decode the characters
> "UDP"...
> 
> "Usenet Death Penalty"  nope, that's not it.
> "User Datagram Packet"  nope, not it either.
> what could it be?  Oh, yeah, "User Documentation Project."
> 
> Can we come up with a different TLA?  That one's already been
> overused.  :)


Post a reply to this message

From: Ken
Subject: Re: Bug in pseudo random? (gif 716b+) (UDP)
Date: 2 Feb 1999 23:32:28
Message: <36B7D13D.F425DFA5@pacbell.net>
Fine with me as long as I don't have to reference it by name.
I'll call it Y for short.

Mike wrote:
> 
> How about calling it the YKYBRTLWYCAPFMAUDTIMTTTOTCWTP?
> 
> -Mike
> 
> Ronald L. Parker wrote:
> >
> > On Tue, 02 Feb 1999 18:13:15 +0100, Spider <spi### [at] bahnhofse> wrote:
> >
> > >More thoughts.
> > >If this won't change(I doubt it will) then a note in the documentation
> > >should note about this, and make the user aware of it. A thing for the
> > >UDP ?
> >
> > Aaaahhh!
> >
> > A peek inside parkrrrr's mind while he tries to decode the characters
> > "UDP"...
> >
> > "Usenet Death Penalty"  nope, that's not it.
> > "User Datagram Packet"  nope, not it either.
> > what could it be?  Oh, yeah, "User Documentation Project."
> >
> > Can we come up with a different TLA?  That one's already been
> > overused.  :)

-- 
Ken Tyler

tyl### [at] pacbellnet


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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