POV-Ray : Newsgroups : povray.binaries.animations : 384 kbbu MPG-1: acceleration for spaceships Server Time
19 Jul 2024 13:22:21 EDT (-0400)
  384 kbbu MPG-1: acceleration for spaceships (Message 1 to 2 of 2)  
From: Greg M  Johnson
Subject: 384 kbbu MPG-1: acceleration for spaceships
Date: 10 Aug 2002 22:12:45
Message: <3d55c81d@news.povray.org>
Given a defined object "shippy" and a reorient or Oritransform vector, I
came up with this simple method for movement of a vehicle.   All of the
tinkering is done with the Acceleration spline.  It may be more realistic
than movement *along* a spline, but TJMHO.  The nice thing is you can tinker
with Final_Frame << TotalFrames and still see exactly where the ship is
going to end up...

#declare TotalFrames=150;

#declare Pee=<0,-200,0>;

#declare Acc=  //accelerator
        spline {
        linear_spline
        0.00,<.3,0,-0>
        0.25,<0,9,-.1>
        0.25,<0,0,-.1>
        0.30,<0,-0.0,-.1>
        1.0, <.5,-4,-38.5>
}
#declare Vee=<0,0,0>;

#declare n=0;
#while(n<TotalFrames+1)

#declare Vee=Vee+(0.1*Acc(n/TotalFrames));
#declare Pee=Pee+0.1*Vee;


#if (int(clock*150)=n)
        object{shippy Oritransform(x+0.0001*y,<Vee.x,0,Vee.z>) translate
400*z+Pee rotate 0*y }//translate -300*clock*z}
#end
#declare n=n+1;
#end


Post a reply to this message


Attachments:
Download 'drive04c.mpg' (380 KB)

From: Greg M  Johnson
Subject: Re: 384 kbbu MPG-1: acceleration for spaceships
Date: 10 Aug 2002 22:24:39
Message: <3d55cae7$1@news.povray.org>
should be:

#if (int(clock*TotalFrames)=n)


Post a reply to this message

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