POV-Ray : Newsgroups : povray.binaries.animations : 1st contact : Re: 1st contact Server Time
5 Nov 2024 01:24:08 EST (-0500)
  Re: 1st contact  
From: m o p s
Date: 3 Aug 2000 13:11:39
Message: <3989a7cb@news.povray.org>
I used gravity ;
#declare Vel=Vel+dt*Gravity;
                #declare Pos=Pos+dt*Vel;
                #if ( Pos.z<-10)
                        #declare dtp=((-10-Pos.z)*dt)/(oPos.z-Pos.z);
                        #declare Vel=-Elas*Vel; // when the ball bounce
                        #declare Pos=<Pos.x,Pos.y,-10+Vel.z*(dt-dtp)>;
                #end
// the variable dt represent the time between two frames

but especially a text-file to memorize the position and the speed of the
balls between each image. A significant point I believe, I created a random
difference in elasticity of the balls to avoid too perfect rebounds. Codes
can be downloaded at :
http://perso.wanadoo.fr/mops/atelier.htm

--
My Own Private Square.
http://perso.wanadoo.fr/mops/

Sorry this an automatically translated text, be lenient please.


Post a reply to this message

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