POV-Ray : Newsgroups : povray.advanced-users : Clock Problem (or question) : Re: Clock Problem (or question) Server Time
2 Nov 2024 03:14:16 EDT (-0400)
  Re: Clock Problem (or question)  
From: Rune
Date: 23 Jul 2000 10:43:23
Message: <397b048b@news.povray.org>
"H. E. Day" wrote:
> Ok, here's what I have.
> I've got a spline{} declared.  When the (say I'm only using the x
variable)
> value of this spline is over one I want to: create a projectile, save the
> current clock value, and use that saved value to achieve rotation and
> translation based on two other splines. Then I want to move the projectile
> along a straight path at a constant rate.
> I have no idea how to do this.

// myclock will be equal to clock until myvalue gets above 1.
// At that point myclock will "freeze".

#if (myvalue>1)
   #fopen data "data.inc" write
      #write (data,"#declare myclock = ",clock,";\n")
   #fclose data
#end

#if (file_exists("data.inc")=1)
   #include "data.inc"
#else
   #declare myclock = clock;
#end

Is this what you need?

Rune
--
Updated July 10: http://rsj.mobilixnet.dk
3D images, include files, stereograms, tutorials,
The POV Desktop Theme, The POV-Ray Logo Contest,
music, 350+ raytracing jokes, and much more!


Post a reply to this message

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