POV-Ray : Newsgroups : povray.text.scene-files : PC System Time in POV-Ray Server Time
25 Dec 2024 12:33:25 EST (-0500)
  PC System Time in POV-Ray (Message 1 to 4 of 4)  
From: Bob Hughes
Subject: PC System Time in POV-Ray
Date: 29 Aug 1999 19:32:36
Message: <37c9c314@news.povray.org>
batch file (save as gettime.bat):

echo " > c:\gottime.txt
echo | more | time | find "Current" >> c:\gottime.txt
echo "; >> c:\gottime.txt


pov script:

// Persistence of Vision Ray Tracer Scene Description File
// File: gettime.pov
// Vers: 3.1
// Desc: Use to get system time after gettime.bat file is run.
// Date: 99.66
// Auth: Bob Hughes  mailto:inv### [at] aolcom?Subject=PoV-Scene
// Note: Run the batch file gettime.bat before rendering this script
to see system time.
//       Could be used to operate parameters based on the system time
for example by using
//       the HourTime and MinuteTime values.

#fopen MyFile "c:\gottime.txt" read

#read (MyFile,MyTime)

#fclose MyFile

#declare HourTime = val(substr(MyTime,20,2))
#declare MinuteTime = val(substr(MyTime,23,2))
#declare DayTime = substr(MyTime,31,1)

#declare Time =
 concat("Time is ", str(HourTime,2,0) ," Hours and ",
str(MinuteTime,2,0), " Minutes ", DayTime,"m")

 text{ttf "timrom.ttf",Time,0.05,0 scale <.75,1.25,1> translate -y/2
  pigment {rgb 1}
   finish {ambient 1}
  translate -5.75*x
}

camera
{
  location  <0,0,-9>
  look_at   <0,0,0>
}


There may be a problem with double digit hours since I only tested
with current time of 5 something o'clock. I will see. No, it is okay
for double digits too ;)
The rest is up to you as to how it is used.



--
omniVERSE


Post a reply to this message

From: Ken
Subject: Re: PC System Time in POV-Ray
Date: 30 Aug 1999 08:09:58
Message: <37CA745A.DE9A5B0C@pacbell.net>
Bob Hughes wrote:
> 
> batch file (save as gettime.bat):

> The rest is up to you as to how it is used.
> 
> --
> omniVERSE

 Not to belittle your individual accomplishment here but by the time you
spend activating the batch file and then adding all of the necessary script
to your scene wouldn't it be simpler to just type the time in yourself ?

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Jerry
Subject: Re: PC System Time in POV-Ray
Date: 30 Aug 1999 16:25:50
Message: <jerry-3008991325500001@cerebus.acusd.edu>
In article <37CA745A.DE9A5B0C@pacbell.net>, Ken <tyl### [at] pacbellnet> wrote:
> Not to belittle your individual accomplishment here but by the time you
>spend activating the batch file and then adding all of the necessary script
>to your scene wouldn't it be simpler to just type the time in yourself ?

There are times when having access to the system time is useful for
automating things. The time can be used as a seed when you want random
numbers that change per render; it can be useful if you're rendering data
on a regular basis and you want it time stamped.

Jerry


Post a reply to this message

From: Bob Hughes
Subject: Re: PC System Time in POV-Ray
Date: 31 Aug 1999 12:10:13
Message: <37cbfe65@news.povray.org>
Certainly a matter of how it's to be used. Think there are more uses
than I could come up with right now anyway. So far I've only made this
time of run thing, but yes, the variables are there to be plugged into
any definition.

Bob

Jerry <jer### [at] acusdedu> wrote in message
news:jer### [at] cerebusacusdedu...
> In article <37CA745A.DE9A5B0C@pacbell.net>, Ken
<tyl### [at] pacbellnet> wrote:
> > Not to belittle your individual accomplishment here but by the
time you
> >spend activating the batch file and then adding all of the
necessary script
> >to your scene wouldn't it be simpler to just type the time in
yourself ?
>
> There are times when having access to the system time is useful for
> automating things. The time can be used as a seed when you want
random
> numbers that change per render; it can be useful if you're rendering
data
> on a regular basis and you want it time stamped.
>
> Jerry


Post a reply to this message

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