Take a ride on the Rossler Rollercoaster.

-Animation by Timothy Jones



ross.c:
#include "stdio.h"
#include "stdlib.h"
#include "math.h"

int main(int argc,char **argv)
{

FILE* fp;
fp = fopen(argv[1],"w");
int i=0;
int N=atoi(argv[1])+1000;


double x0,y0,z0,x1,y1,z1;
double h = 0.07;
double aa = 0.2;
double bb = 0.2;
double cc = 5.7;

x0 = 0.1;
y0 = 0.1;
z0 = 0.1;

for (i=0;i 1000){
     fprintf(fp,"Sp(%f,%f,%f,0.09,%f)\n",x0,y0,z0,fabs(sin(1.0*i/10)));}

     double X = x0 - 0.5*sin(1.0*N/100);
     double Y = y0 + 0.7 + 0.5*sin(1.0*N/100); ;
     double Z = z0 + 6*sin(1.0*N/100)*sin(1.0*N/100);// + 0.1 + 200*((N-2000)/1000);  ///100*(% is for final run
     fprintf(fp, "camera {location <%f, %f, %f> look_at <%f, %f,%f>}\n",X,Y,Z, x0,y0,z0);

 }

temp.pov:
#include "colors.inc"  
#include "textures.inc"
light_source{<100,200,-150> color White*0.7}
light_source{<-100, 100,100> color Gold*0.7}
light_source{<100,-100,500> color White*0.7}

background {
  color rgb <0,0,0>
  }

  #macro Sp(x0,y0,z0,rad,col)
   sphere {< x0,y0,z0 >, rad 
           pigment{ rgb< 1-0.5*col,1,1 >}
	   finish { reflection .7 phong .6 } }
  #end

go.ini:
Output_File_Type=N
Width=500
Height=500
Quality=9
Antialias=on
Antialias_Threshold=0.001

run.pl:
#!/usr/bin/perl
for($num=0; $num<9001; $num++){
$file = ($num+1000).".pov";
system("./ross $num");
system("cat temp.pov > $file");
system("cat $num >> $file");
system("povray go.ini $file -Display=False");}

Linux command line:
#> g++ -o ross ross.c
#> ./run.pl