POV-Ray : Newsgroups : povray.advanced-users : Clock Problem (or question) : Re: Clock Problem (or question) Server Time
2 Nov 2024 03:13:13 EDT (-0400)
  Re: Clock Problem (or question)  
From: Rune
Date: 23 Jul 2000 17:51:25
Message: <397b68dd@news.povray.org>
"John VanSickle" wrote:
> "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.
> >
> > Does this explain what I need well enough?
>
> The way I go about doing this is to figure out what time the spline
> reaches the point in question, and then use an #if-#else-#end block
> to model the motion before and after this time.

If the animation is dependent on the clock value alone (which is most often
the case) I would say too that this is the best solution. Only if some
calculations are done on a frame-by-frame basis the method I posted is
necessary.

> It is highly likely that the precise time will fall at a period
> between the time of two different frames; hence at the latter of the
> two frames, some of the motion after the event will already have
> occured.

I presume that we want to find the first time the event occurs. Unless the
event is caused a whole lot of times during the animation, it should be
pretty easy to find the "first intersection".

Greetings,

Rune
--
Updated July 23: 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.