POV-Ray : Newsgroups : povray.animations : animation tracks for armour vehicul : Re: animation tracks for armour vehicul Server Time
28 Jul 2024 16:20:36 EDT (-0400)
  Re: animation tracks for armour vehicul  
From: David Wilkinson
Date: 8 Sep 1999 18:47:12
Message: <cebWN=h=SpHzhWbSJKMPgIwKwl7K@4ax.com>
On Mon, 6 Sep 1999 16:56:56 +0100, "boguet" <j_b### [at] yahoocom> wrote:

>Can somebody help me to design pov files.
>It is about an animation of tracks from track vehicule.
>I would like to know how to positioned each element.
>And to animat all of them for when vehicule started and
>go on a plane road.
>It seems hard to me ( i have not found solution since few month . . . ) to
>make this.If you want more information on my tracks and the nature of the
>vehicule my e-mail is j_b### [at] yahoocom
>I am not good in english speaking so excuse me.
>Some explications or ideas are wellcome.
>
>BOGUET Jerome
>
How about this as a start?

// POV program for animated tracks
//  David Wilkinson  8 Sept 1999
#include "colors.inc"
global_settings
{
  assumed_gamma 1.0
}
camera
{
  location  <2, 3, -8.0>
  direction 1.5*z
  right     4/3*x
  look_at   <2, 1,  0.0>
}
sky_sphere
{
  pigment
  {
    gradient y
    color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
  }
}
light_source
{
  <-60, 60, -30>
  color rgb 1
}
light_source
{
  <60, 60, -30>
  color rgb 1
}

#declare Pitch=0.4 // pitch of track treads
#declare R1=20*Pitch/(2*pi); // radius of end wheels
#declare Dist1=4; // distance between end wheels
plane { y, -(R1+Pitch/2) pigment {color rgb <0.7,0.5,0.3>}} // ground plane

union {
// bottom of track 
      #local Count=0;
      #while (Count<10)
         box { 0, <Pitch/2,Pitch/2,1> translate <Pitch*(Count-clock),-(R1+Pitch/2),0>}
         #local Count=Count+1;
      #end 
              
// LH end of track
      #local Count=1;
      #while (Count<11)
         box { 0, <Pitch/2,Pitch/2,1> 
           translate -(R1+Pitch/2)*y
           rotate -z*degrees((Pitch/R1)*(Count+clock))
         }
         #local Count=Count+1;
      #end    

// RH end of track
      #local Count=0;
      #while (Count<11)
         box { 0, <Pitch/2,Pitch/2,1>
           translate -(R1+Pitch/2)*y
           rotate z*degrees((Pitch/R1)*(Count-clock))
           translate Dist1*x
         }
         #local Count=Count+1;
      #end    

// top of track 
      #local Count=0;
      #while (Count<9)
         box { 0, <Pitch/2,Pitch/2,1> translate <Pitch*(0.5+Count+clock),R1,0>}
         #local Count=Count+1;
      #end 

  pigment { Red }
}            

------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

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