POV-Ray : Newsgroups : povray.beta-test : Time Server Time
30 Jul 2024 02:22:06 EDT (-0400)
  Time (Message 1 to 8 of 8)  
From: tcdev
Subject: Time
Date: 13 Jan 2002 13:24:16
Message: <3C41D06F.3070909@twcny.rr.com>
It's probably too late to suggest this, but it would be real nice to 
have a time() function to get the system time for use with the seed() 
funtion.

thanks


Post a reply to this message

From: bob h
Subject: Re: Time [please, no feature requests]
Date: 13 Jan 2002 14:13:33
Message: <3c41dc5d@news.povray.org>
"tcdev" <tde### [at] twcnyrrcom> wrote in message
news:3C4### [at] twcnyrrcom...
> It's probably too late to suggest this, but it would be real nice to
> have a time() function to get the system time for use with the seed()
> funtion.

Feature requests aren't possible at this point, sorry.  Light at the end of
the tunnel though... Await the next incarnation of MegaPOV and perhaps it
can be added to that instead.
Trying to remember, seems to me that it hadn't been done before due to the
various platform differences in how it would be extracted.  There is a
workaround for getting it via a batch file run prior to rendering, just not
exactly a real answer to your request.  See
news://news.povray.org/382b7695@news.povray.org

bob h


Post a reply to this message

From: Warp
Subject: Re: Time [please, no feature requests]
Date: 13 Jan 2002 14:20:01
Message: <3c41dde0@news.povray.org>
bob h <omn### [at] charternet> wrote:
: Feature requests aren't possible at this point, sorry.  Light at the end of
: the tunnel though... Await the next incarnation of MegaPOV and perhaps it
: can be added to that instead.

  Although it is a genuine feature request, it can be implemented in about
one line of C code. Just reserve a special value (eg. -1) and if this value
is used, then the seed is read from the C time() function (ie. if you do
#declare S=seed(-1); then you get a seed from that function).

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: bob h
Subject: Re: Time [please, no feature requests]
Date: 13 Jan 2002 14:31:04
Message: <3c41e078@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c41dde0@news.povray.org...
> bob h <omn### [at] charternet> wrote:
>
> Just reserve a special value (eg. -1) and if this value
> is used, then the seed is read from the C time() function (ie. if you do
> #declare S=seed(-1); then you get a seed from that function).

Gee, that sounded awfully simple to do.  So I wonder why it hasn't been
done?


Post a reply to this message

From: Christopher James Huff
Subject: Re: Time [please, no feature requests]
Date: 13 Jan 2002 14:43:50
Message: <chrishuff-BF7AA5.14443513012002@netplex.aussie.org>
In article <3c41dde0@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   Although it is a genuine feature request, it can be implemented in about
> one line of C code. Just reserve a special value (eg. -1) and if this value
> is used, then the seed is read from the C time() function (ie. if you do
> #declare S=seed(-1); then you get a seed from that function).

A separate date() or time() function would be more flexible, though. 
It's been done for MegaPOV, I actually thought POV 3.5 included them...

A related patch I've been thinking of writing would allow you to use 
"rand()" to get random numbers from an internal time-seeded stream.

You could just use one of the usual workarounds for now...for example, 
write a new seed to a file and read it in for the next render.

-- 
 -- 
Christopher James Huff <chr### [at] maccom>


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Time [please, no feature requests]
Date: 13 Jan 2002 15:33:23
Message: <3c41ef13@news.povray.org>
In article <chr### [at] netplexaussieorg> , 
Christopher James Huff <chr### [at] maccom>  wrote:

> You could just use one of the usual workarounds for now...for example,
> write a new seed to a file and read it in for the next render.

Which works just as well and also allows to have multiple random number
screems with a different seed!

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Warp
Subject: Re: Time [please, no feature requests]
Date: 13 Jan 2002 15:35:05
Message: <3c41ef79@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
: A separate date() or time() function would be more flexible, though. 

  Yes, but it requires more work. Perhaps too much work for a feature request
at this stage.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: PeterC
Subject: Re: Time
Date: 28 Jan 2002 21:42:57
Message: <3c560ad2.10054928@localhost>
On Sun, 13 Jan 2002 13:22:39 -0500, tcdev <tde### [at] twcnyrrcom>
wrote:

>It's probably too late to suggest this, but it would be real nice to 
>have a time() function to get the system time for use with the seed() 
>funtion.
>
>thanks
>

I wrote a .pov include that almost does this.  It deosn't get
the seed from the time, it gets the seed from a file.  So far
not very useful, right?  well: it allows the new updated seed
to be written back to that same file.  So the random numbers
are different between renders.  I think I posted this once but
I forget.  If anyone asks, I'll post it again.

Pete


Post a reply to this message

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