POV-Ray : Newsgroups : povray.newusers : Rollercoaster type maths (not possible in povray?) : Re: Rollercoaster type maths (not possible in povray?) Server Time
29 Jul 2024 10:30:36 EDT (-0400)
  Re: Rollercoaster type maths (not possible in povray?)  
From: CdeathJd
Date: 6 Aug 2006 15:30:01
Message: <web.44d6421dd4496aa8e2e0912a0@news.povray.org>
Urs Holzer <urs### [at] andonyarcom> wrote:
> Just evaluate the spline at two times. Once where you are in time now
> and once a second later. This gives you the position you have now and
> the position you will have a second later. If you substract these two
> values you will have the velocity. (The velocity is a vector pointing
> in the direction you move. His length is your speed.)
>

This would be good to do, if its gone down, add some velocity, but im too
used to basic and i cant do it in pov-ray, its two different languages, the
only similarity is the maths.

I have no idea how to grab the x,y,z value from the camera, or the spline. I
failed here in basic aswell, but cant really explain why, and that wasnt
using splines at all.

I tried doing this in the camera statement:
      Spline_Trans (MySpline, clock-1, y, 0.85, 0.85)
      //translate <50, 42.5, -212>
      #declare ythen=y;
      Spline_Trans (MySpline, clock, y, 0.85, 0.85)
      #declare ynow=y;

it didnt error, but the camera then went far to the left of the track, even
if by chance, the "ythen" and "ynow" values worked, and the view didnt
shift to the left, i still wouldn't know what to do next. Its a shame it
doesnt work more like other programming languages! Then it would have been
easier :S


Post a reply to this message

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