POV-Ray : Newsgroups : povray.newusers : ClockAnimation Help: printing sequential numbers Server Time
5 Sep 2024 10:27:42 EDT (-0400)
  ClockAnimation Help: printing sequential numbers (Message 1 to 7 of 7)  
From: Jong
Subject: ClockAnimation Help: printing sequential numbers
Date: 10 May 2001 01:50:51
Message: <3AFA2C4C.2F6609E5@mm.ewha.ac.kr>
Dear all,

 I am using Chris Colfax's animation patch. I'd like to know how I could
get the changing values during the animation, for example, rotated angle
on sequential image.
I really appreciate the help from POV'ers with my previous similar
posting a while ago. Since then, however,  I've got not much of
improvement in programming knowledge of POV.
If I change the light source angle from 0 to -180 around Z axis, I'd
like to get or extract the value of the angle for that specific frame,
and pass the number for text printing on the image.
For frame 1, the rotated angle value would be 0,  and some middle
numbers, and then the final
number -180.
Are there any specific variable name Chris might have assigned for the
ClockMod patch I could use?
=====================

#declare somevariable= TheChangingAngle  // Need help for this sort of
assigning
  light_source { <-80,0, -50> color rgb<1,1,1>
                      rotate
                     From (0.0, <0,0,0>)
                     Using("",1,1,"")
                     To(1, <0,0,-180>
                     }
==================
Thanks,

Jong


Post a reply to this message


Attachments:
Download 'us-ascii' (2 KB)

From: ingo
Subject: Re: ClockAnimation Help: printing sequential numbers
Date: 10 May 2001 05:23:27
Message: <Xns909D743E9EA8Cseed7@povray.org>
in news:3AFA2C4C.2F6609E5@mm.ewha.ac.kr Jong wrote:

> Are there any specific variable name Chris might have assigned for
> the ClockMod patch I could use?
> 

For explaination look in the documentation AutoClck.htm under "Using 
specified macros"

#declare LightRot=<0,0,0>; 
Declare_From(LightRot, 0)
Declare_To(LightRot,1, <0,0,-180>)

light_source { 
   <-80,0, -50> color rgb<1,1,1>
   rotate LightRot
}

#debug concat(
   "\n Light Rotation <",
   str(LightRot.x,2,2),",",
   str(LightRot.y,2,2),",",
   str(LightRot.z,2,2),">\n"
)


Ingo

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


Post a reply to this message

From: Warp
Subject: Re: ClockAnimation Help: printing sequential numbers
Date: 10 May 2001 06:00:45
Message: <3afa66cd@news.povray.org>
Jong <jjk### [at] mmewhaackr> wrote:
:  I am using Chris Colfax's animation patch.

  A note on terminology here:

  Usually a "patch" is a modified version of POV-Ray. That is, the source
code of POV-Ray itself has been modified and re-compiled in order to get
a functionality.

  Chris Colefax has made "includes" (or "include files" or sometimes even
"macros", although the latter can be sometimes a bit misleading specially when
the implemenation of the include is not made with a #macro), which are
closer to plug-ins (although not in the strictest meaning of "plug-in").
  So it's more correct to speak about an "animation include" (or even
"animation macro" if the implementation is a #macro) than a "patch".
Even "animation plug-in" would be closer than "patch".

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Chris Colefax
Subject: Re: ClockAnimation Help: printing sequential numbers
Date: 10 May 2001 09:29:33
Message: <3afa97bd@news.povray.org>
Jong <jjk### [at] mmewhaackr> wrote:
> I am using Chris Colfax's animation patch. I'd like to know how I could
>get the changing values during the animation, for example, rotated angle
>on sequential image.
>I really appreciate the help from POV'ers with my previous similar posting
>a while ago. Since then, however,  I've got not much of improvement in
>programming knowledge of POV.
>If I change the light source angle from 0 to -180 around Z axis, I'd like
>to get or extract the value of the angle for that specific frame, and pass
>the number for text printing on the image.
>For frame 1, the rotated angle value would be 0,  and some middle numbers,
>and then the final
>number -180.
>Are there any specific variable name Chris might have assigned for the
>ClockMod patch I could use?

As Ingo has already replied, the Automatic Clock Modifier includes macros
that let you declare keyframed values, which you can then output to one of
POV-Ray's text streams, to a file, or to a text object in your scene (for a
head-up display, or a label).  One small thing to note is that you can use a
shortcut notation for the declaring, if you enclose the list of values in
round brackets, i.e.:

#declare ChangingAngle = (
    From (0.0, <0,0,0>)
    Using("",1,1,"")
    To(1, <0,0,-180>);

light_source { <-80,0, -50> color rgb<1,1,1>
    rotate ChangingAngle
    }

// Use string functions to output ChangingAngle

This is quicker and easier than rewriting your list of animated values using
the Declare macros.


Post a reply to this message

From: Jong
Subject: Re: ClockAnimation Help: printing sequential numbers
Date: 10 May 2001 22:59:30
Message: <3AFB55CA.6573747E@mm.ewha.ac.kr>
Dear Chris,

 Thank you for your big help.
btw, I've inserted your short scripts to my pov file.
I encountered error message as below:

#local _CM_ivalue = _CM_current_value + _CM_ivalue;
#undef _CM_current_value #declare _CM_current_value = _CM_ivalue;
#;   <--- error

 ....   error ) expected but ; found instead.

All of the demo files that came with AutoClck.zip ran OK, though.

Thanks,

Jong

Chris Colefax wrote:

> Jong <jjk### [at] mmewhaackr> wrote:
> > I am using Chris Colfax's animation patch. I'd like to know how I could
> >get the changing values during the animation, for example, rotated angle
> >on sequential image.
> >I really appreciate the help from POV'ers with my previous similar posting
> >a while ago. Since then, however,  I've got not much of improvement in
> >programming knowledge of POV.
> >If I change the light source angle from 0 to -180 around Z axis, I'd like
> >to get or extract the value of the angle for that specific frame, and pass
> >the number for text printing on the image.
> >For frame 1, the rotated angle value would be 0,  and some middle numbers,
> >and then the final
> >number -180.
> >Are there any specific variable name Chris might have assigned for the
> >ClockMod patch I could use?
>
> As Ingo has already replied, the Automatic Clock Modifier includes macros
> that let you declare keyframed values, which you can then output to one of
> POV-Ray's text streams, to a file, or to a text object in your scene (for a
> head-up display, or a label).  One small thing to note is that you can use a
> shortcut notation for the declaring, if you enclose the list of values in
> round brackets, i.e.:
>
> #declare ChangingAngle = (
>     From (0.0, <0,0,0>)
>     Using("",1,1,"")
>     To(1, <0,0,-180>);
>
> light_source { <-80,0, -50> color rgb<1,1,1>
>     rotate ChangingAngle
>     }
>
> // Use string functions to output ChangingAngle
>
> This is quicker and easier than rewriting your list of animated values using
> the Declare macros.


Post a reply to this message

From: Chris Colefax
Subject: Re: ClockAnimation Help: printing sequential numbers
Date: 11 May 2001 05:28:45
Message: <3afbb0cd@news.povray.org>
Jong <jjk### [at] mmewhaackr> wrote:
>  Thank you for your big help.
> btw, I've inserted your short scripts to my pov file.
> I encountered error message as below:
>
>  ....   error ) expected but ; found instead.
>
> All of the demo files that came with AutoClck.zip ran OK, though.

Sorry - that was my fault for forgetting to add the last bracket at the end
of the declare statement!  The correct code should have been:

#declare ChangingAngle = (
    From (0.0, <0,0,0>)
    Using("",1,1,"")
    To(1, <0,0,-180>)
    );


Post a reply to this message

From: Jong
Subject: Re: ClockAnimation Help: printing sequential numbers
Date: 12 May 2001 06:23:57
Message: <3AFD0F75.61CFFBB2@mm.ewha.ac.kr>
Dear Chris,

Thank you for your help. It's working perfect.

Jong.

Chris Colefax wrote:

> Jong <jjk### [at] mmewhaackr> wrote:
> >  Thank you for your big help.
> > btw, I've inserted your short scripts to my pov file.
> > I encountered error message as below:
> >
> >  ....   error ) expected but ; found instead.
> >
> > All of the demo files that came with AutoClck.zip ran OK, though.
>
> Sorry - that was my fault for forgetting to add the last bracket at the end
> of the declare statement!  The correct code should have been:
>
> #declare ChangingAngle = (
>     From (0.0, <0,0,0>)
>     Using("",1,1,"")
>     To(1, <0,0,-180>)
>     );


Post a reply to this message

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