POV-Ray : Newsgroups : povray.general : Random Numbers? Server Time
8 Aug 2024 04:12:34 EDT (-0400)
  Random Numbers? (Message 1 to 7 of 7)  
From: Doug Moses
Subject: Random Numbers?
Date: 24 Mar 2001 09:52:08
Message: <3abcb498$1@news.povray.org>
I am new to PovRay and looking for a way to generate random numbers. There
is a clock function that I looked at but is there any other function such as
RND, RANDOM, etc that PovRay has that can generate random numbers? What I am
trying to do is create a pattern on an image using "crackle" that will
change each time I render it. The pattern stays static each time despite
using, "Omega", "Turbulence" etc. Is this something that can be done without
having to setup animation?

Thank you for your time.
Doug


Post a reply to this message

From: Francois Labreque
Subject: Re: Random Numbers?
Date: 24 Mar 2001 10:08:36
Message: <3ABCB7BB.B5E6318F@videotron.ca>
Doug Moses wrote:
> 
> I am new to PovRay and looking for a way to generate random numbers. There
> is a clock function that I looked at

clock is a keyword used in animations which is related to the frame
currently being rendered, it has nothing to do with random numbers.


> but is there any other function such as
> RND, RANDOM, etc that PovRay has that can generate random numbers?

Look at the seed() and rand() functions.

> What I am
> trying to do is create a pattern on an image using "crackle" that will
> change each time I render it. The pattern stays static each time despite
> using, "Omega", "Turbulence" etc.

Turbulence (and its suboptions omega, lambda, octaves...) will affect
the way a pattern looks, i.e. different values produce different
results, but the same values will ALWAYS produce the same result.

Patterns will always be the same between renders to make sure that your
pattern does not move between frames of an animation or that the copy of
your image rendered on my IBM ES/9000 mainframe looks the same as the
one on your Amiga. 

> Is this something that can be done without
> having to setup animation?

The only ones I can think of are rather complicated.  Anyone?

-- 
Francois Labreque | The surest sign of the existence of extra-
    flabreque     | terrestrial intelligence is that they never
        @         | bothered to come down here and visit us!
  videotron.ca    |                             - Calvin


Post a reply to this message

From: ingo
Subject: Re: Random Numbers?
Date: 24 Mar 2001 10:44:23
Message: <Xns906EAA8A846AEseed7@povray.org>
in <3ABCB7BB.B5E6318F@videotron.ca> Francois Labreque wrote:

>The only ones I can think of are rather complicated.  Anyone?
>
>

MegaPov has the time/date functions, it could be used for a different 
seed for every render.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Chris Huff
Subject: Re: Random Numbers?
Date: 24 Mar 2001 11:14:56
Message: <chrishuff-5B4040.11083424032001@news.povray.org>
In article <Xns### [at] povrayorg>, ing### [at] homenl (ingo) 
wrote:

> MegaPov has the time/date functions, it could be used for a different 
> seed for every render.

You could also save numbers to a file, every time you render the scene, 
generate a random seed value and write that to the file. That seed value 
would then be used next time the scene is rendered, and a new random 
seed value would be written to the file.
Or you could make the random seed value a function of the clock 
variable, and render an animation. I've used this technique to generate 
a bunch of different trees with different seed values with some tree 
macros I created...I put a text object in the scene so I could match 
each seed with it's result.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From:
Subject: Re: Random Numbers?
Date: 25 Mar 2001 03:33:43
Message: <3abda33f.1379947@news.povray.org>
On Sat, 24 Mar 2001 10:05:31 -0500, Francois Labreque
<fla### [at] videotronca> wrote:
>Patterns will always be the same between renders to make sure that your
>pattern does not move between frames of an animation or that the copy of
>your image rendered on my IBM ES/9000 mainframe looks the same as the
>one on your Amiga. 

Do you do raytracing on a ES/9000 ?? I ported one of the previous
versions of POV-Ray to MVS/ESA, what OS are you running under ?? I
found my source conversion code recently and was wondering if a port
would be worth-while speed-wise, after all the IBM mainframes aren't
known for their floating point performance. Back when a 486/50 MHz was
a fast machine my port ran 7 times faster on a IBM 3090 Model 180. The
shift from bipolar to cmos technology in the mainframes ate a lot of
mips so I doubt that a port to the (almost) current version of ES/9000
HW would be much faster than a 1 GHz PC. At the time I made the port
PCs didn't have much memory, a 4 MB pc was a big machine, we had 256
MB on the mainframe.

/Erkki


Post a reply to this message

From: Francois Labreque
Subject: Re: Random Numbers?
Date: 25 Mar 2001 08:44:40
Message: <3ABDF58A.A31CE859@videotron.ca>

> 
> On Sat, 24 Mar 2001 10:05:31 -0500, Francois Labreque
> <fla### [at] videotronca> wrote:
> >Patterns will always be the same between renders to make sure that your
> >pattern does not move between frames of an animation or that the copy of
> >your image rendered on my IBM ES/9000 mainframe looks the same as the
> >one on your Amiga.
> 
> Do you do raytracing on a ES/9000 ??

I was just joking.  Sorry.

-- 
Francois Labreque | The surest sign of the existence of extra-
    flabreque     | terrestrial intelligence is that they never
        @         | bothered to come down here and visit us!
  videotron.ca    |                             - Calvin


Post a reply to this message

From: Pete
Subject: Re: Random Numbers?
Date: 25 Mar 2001 11:46:48
Message: <148.484T2416T7045689PeterC@nym.alias.net>
I will post .pov source for a self-reseeding random number
generator in the povray.binaries.scene-files group.
Subject: "self seeding random"

Pete


Post a reply to this message

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