POV-Ray : Newsgroups : povray.binaries.animations : need help - clock - Server Time
27 Jun 2024 17:28:14 EDT (-0400)
  need help - clock - (Message 1 to 10 of 17)  
Goto Latest 10 Messages Next 7 Messages >>>
From: nero corporations
Subject: need help - clock -
Date: 5 Feb 2007 07:30:00
Message: <web.45c722861dc15a0af1f505550@news.povray.org>
hi all,

i`m quite new to pov ray and dealing with this subject in school. our
teacher gave us the task to produce a clock animation which shows the exact
time (h,min + secs) by the next three weeks.

i have really no idea what do now and i need your help...

hope for your assist...

regards jan


Post a reply to this message

From: Stephen
Subject: Re: need help - clock -
Date: 5 Feb 2007 08:25:01
Message: <web.45c72fe152f9d244f1cb1e660@news.povray.org>
"nero.corporations" <ner### [at] webde> wrote:
> hi all,
>
> i`m quite new to pov ray and dealing with this subject in school. our
> teacher gave us the task to produce a clock animation which shows the exact
> time (h,min + secs) by the next three weeks.
>
> i have really no idea what do now and i need your help...
>
> hope for your assist...
>
> regards jan

Hi Jan

word that should be used lightly. Possibly a clock face with hands that move
representing the time. Or a digital clock with a changing LED.
Another couple of questions to ask are;
1. What is the maximum file size?
2. What accuracy is required?

Depending on the answers to the above questions the project will have
different solutions. My guess for what s/he wants is an analogue clock
whose minute and hour hands move along with the second hand.

Oh! BTW welcome and since you are new to Pov-Ray the newusers forum might be
a good place to ask follow up questions. The p.b.a is for files such as avi
or mpeg, where we can show off :-)


Stephen


Post a reply to this message

From: Mike the Elder
Subject: Re: need help - clock -
Date: 5 Feb 2007 17:10:01
Message: <web.45c7ab2f52f9d2442d8fb84f0@news.povray.org>
"clock" is a built-in variable that has value of 0 for the first frame of an
animation and 1 for the last, spanning the intermediate range of values as
the progam progesses from frame to frame. To use it, one must set the
number of frames to be created using "final_frame".  IMHO, the easiest way
to deal with this is to edit the "quickres.ini" file and create a new entry
that is a copy of the resolution that you want to use and add on, for
example, "final_frame=60" to produce sixty frames.  (Remember to change the
label in the [ ] to show that this is an animation setting.) When you render
with this resolution setting selected, the program will render a series of
individual frames with names like: mypic01.bmp, mypic02.bmp,... to
mypic60.bmp  Hopefully, your instructor has provided you with some resource
with which to assemble the individual frames into an animated file type such
as a "gif", "mpeg" or "avi" (there are more kinds).  If not, that might be a
whole new help question.

Out of curiosity, did your insturctor specify POV-Ray as the software to use
for this?  Was this perhaps intended to be a much simpler assignment using
something like BASIC of some sort to draw a clock using the value of the
TIME function?  I love POV-Ray, but it seems a rather Rube-Goldberg-like
(e.g. needlessly elaborate) way of making an animated clock, especially
considering the fact that the resuling animation would always show the time
range specified in the pov file code and not the actual time of day.  I hope
you will continue to use POV-Ray and learn to love it as many of us have,
but the next step with regard to the task at hand is more likely than not
going to be defining the assignment in more specific terms.

Also, please note that this area of the newsgroups is intended for posting
animations, not questions.  You will probably get more and better help if
you are careful to post questions in the areas designated for that purpose.

Best Wishes,
-Mike


"nero.corporations" <ner### [at] webde> wrote:
> hi all,
>
> i`m quite new to pov ray and dealing with this subject in school. our
> teacher gave us the task to produce a clock animation which shows the exact
> time (h,min + secs) by the next three weeks.
>
> i have really no idea what do now and i need your help...
>
> hope for your assist...
>
> regards jan


Post a reply to this message

From: nero corporations
Subject: Re: need help - clock -
Date: 7 Feb 2007 14:05:00
Message: <web.45ca21e652f9d2445d00c5b70@news.povray.org>
Ok, to redefine the situation:

- first u must know our teacher is a real IDIOT, i dont know how he got so
far getting a teacher... he has no knowledge of pc
- when he says "a clock" you can give him anything that looks similar to a
clock and hes satisfied (we wrote our test on different pcs, but all got
the same solution and he didnt notice and gave us all the best mark there
is)

so i need a clock showing the hours, mins and secs. nothing more... nothing
special, can be the simplest code there is :P

regards


Post a reply to this message

From: Stephen
Subject: Re: need help - clock -
Date: 7 Feb 2007 14:23:57
Message: <ip9ks29o7mlavmn9s1vu31l0mtalponjc0@4ax.com>
On Wed,  7 Feb 2007 14:00:59 EST, "nero.corporations" <ner### [at] webde>
wrote:

>Ok, to redefine the situation:
>
>- first u must know our teacher is a real IDIOT, i dont know how he got so
>far getting a teacher... he has no knowledge of pc
>- when he says "a clock" you can give him anything that looks similar to a
>clock and hes satisfied (we wrote our test on different pcs, but all got
>the same solution and he didnt notice and gave us all the best mark there
>is)
>
>so i need a clock showing the hours, mins and secs. nothing more... nothing
>special, can be the simplest code there is :P
>
>regards
>
>

Are you looking for some completed code?

Regards
	Stephen


Post a reply to this message

From: Charles C
Subject: Re: need help - clock -
Date: 7 Feb 2007 15:00:00
Message: <web.45ca2ef152f9d244704594a90@news.povray.org>
It sounds like you don't care about this class.   Given that while also
considering it'd be cheating for anybody to give you something all written
out, I'll just say put a sphere at the origin for the spindle around which
the hands rotate.  Then, use a disk for the face.  Define a sphere at say
the 12 o'clock position and use a #while loop top copy it around for the
different number locations.   Do the same for the seconds positions, but
maybe with smaller spheres/dots.  Declare 3 different sizes of cylinders or
cones or whatever for the hours minutes & seconds and then...

#declare Duration = 1/60; // expressed in hours so 1/60 = 1 min

#object{ Hour_Hand   rotate clock*360*1    *Duration }
#object{ Minute_Hand rotate clock*360*60   *Duration }
#object{ Second_Hand rotate clock*360*60*60*Duration }

If you want to start at something other than 12:00, you can add a starting
angle to each of the rotations.

Hope this helps,
Charles

PS, a digital clock would be almost as easy but would use float and string
functions.



"nero.corporations" <ner### [at] webde> wrote:
> Ok, to redefine the situation:
>
> - first u must know our teacher is a real IDIOT, i dont know how he got so
> far getting a teacher... he has no knowledge of pc
> - when he says "a clock" you can give him anything that looks similar to a
> clock and hes satisfied (we wrote our test on different pcs, but all got
> the same solution and he didnt notice and gave us all the best mark there
> is)
>
> so i need a clock showing the hours, mins and secs. nothing more... nothing
> special, can be the simplest code there is :P
>
> regards


Post a reply to this message

From: Spock
Subject: Re: need help - clock -
Date: 7 Feb 2007 15:16:39
Message: <45ca33a7$1@news.povray.org>
Somewhere in here I'm assuming there is a requirement to use POV, or at 
least a ray-tracer.  If not then check out the HTML solution I posted in 
  povray.off-topic.  Not my code, just something I picked up along the way.

nero.corporations wrote:
> Ok, to redefine the situation:
> 
> - first u must know our teacher is a real IDIOT, i dont know how he got so
> far getting a teacher... he has no knowledge of pc
> - when he says "a clock" you can give him anything that looks similar to a
> clock and hes satisfied (we wrote our test on different pcs, but all got
> the same solution and he didnt notice and gave us all the best mark there
> is)
> 
> so i need a clock showing the hours, mins and secs. nothing more... nothing
> special, can be the simplest code there is :P
> 
> regards
> 
>


Post a reply to this message

From: nero corporations
Subject: Re: need help - clock -
Date: 12 Feb 2007 07:25:00
Message: <web.45d05c2252f9d244718caa6c0@news.povray.org>
hi again,

i do care about this class and everybody in the whole class would get the
code you`ll give me...


Post a reply to this message

From: Stephen
Subject: Re: need help - clock -
Date: 12 Feb 2007 08:05:00
Message: <web.45d065a752f9d244f1cb1e660@news.povray.org>
"nero.corporations" <ner### [at] webde> wrote:
> hi again,
>
> i do care about this class and everybody in the whole class would get the
> code you`ll give me...


completed code for your schoolwork. You will get all the help we can give
you for you to do it yourself. I will describe how I would do it.

First create a clock face. You could use a disc or a cylinder. Next find an
image map that you can use for a texture. I googled
http://images.google.co.uk/images?hl=en&q=clock+face&btnG=Search+Images
Section 3.5.1.5  Image Maps in the documents will tell you how to use them.
Next create your clock hands. I would use CSG (Constructive Solid Geometry)
to create them. You will need something for the centre of the clock face to
represent the spindle that rotates the hands a cylinder will do.
One you have put your clock together you can rotate the hands to show the
time. Remember that all rotations in Pov-Ray are about the origin. So you
will need to offset your hands so that the point of revolution is at the
origin.
Next you will need to use the clock function to animate the rotation.
(3.2.1.3.6  Built-in Variables) Also look at some of the examples that come
with P0v=Ray.

Feel free to ask for help once you have started to build your scene.

Stephen


Post a reply to this message

From: RusHHouR
Subject: Re: need help - clock -
Date: 12 Feb 2007 14:55:01
Message: <web.45d0c55252f9d24447d3ae5e0@news.povray.org>
If you dont care about actually learning anything, then render 70 or so
images and make a gif animation which changes image once per second... ;)


Post a reply to this message

Goto Latest 10 Messages Next 7 Messages >>>

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