Rossler sliced by the z axis of its double cover.
-Animation by Timothy Jones
#include < stdlib.h> #include < math.h> #include < fstream.h> #include < iostream.h> //#include "strstream" int main(int argc, char *argv[]){ int i,j; double X,Y,z; double h=0.008; double DX,DY,Dz; int alpha = -atoi(argv[1]); printf("%i /n",alpha); double number=3.8*(alpha*1.0)/1000; //printf("%f \n",number); // double R = 24.0; double sig = 2.0; double gam = 0.25; double del=number; // float fo=del+1000; //x1 = 0.25; x2 = 0.1; y1 = 0.3; y2=0.13; z = 0.22; double r; double frac; double a=0.432; double b=2.0; double c=4.0; double bb=((c-sqrt(c*c-4*a*b))/2)/a; double cc=c-(c-sqrt(c*c-4*a*b))/2; double mu = number; X=0.12; Y=0.2; z=0.2; // FILE * fp; FILE * fp2; fp2 = fopen (argv[1],"w"); // fp2 = fopen (argv[2],"w"); // fp = fopen ("tor.dat","w"); for(i=0; i<=14000; i++){ r=X*X+Y*Y; frac=1/(2*r); DX=frac*(-r*Y+X*(2*a*Y*Y-z)+mu*Y); DY=frac*(r*X+Y*(2*a*X*X+z)+mu*X); Dz=bb*(X*X-Y*Y+mu)+z*(X*X-Y*Y-cc+mu); X += DX * h; Y += DY * h; z += Dz * h; } printf("%f \n",mu); for(i=0; i<=70000; i++){ r=X*X+Y*Y; frac=1/(2*r); DX=frac*(-r*Y+X*(2*a*Y*Y-z)+mu*Y); DY=frac*(r*X+Y*(2*a*X*X+z)+mu*X); Dz=bb*(X*X-Y*Y+mu)+z*(X*X-Y*Y-cc+mu); X += DX * h; Y += DY * h; z += Dz * h; // fprintf (fp, "%f %f %f \n",X,Y,z); // fprintf(fp2,"%f %f %f \n", X*X-Y*Y, 2*X*Y, z+20); fprintf(fp2,"SP(%f, %f, %f, 0.05)\n",X,Y,z);} // fprintf(fp2,"SP(%f, %f, %f, 0.05)\n",(X*X-Y*Y),2*X*Y,z-20);} fprintf(fp2,"cylinder {<%f,0,-12>,<%f,0,-25>,.2 texture{pigment{color Red} finish {ambient 0.15 diffuse 0.75 reflection 0.1 phong 1}}}\n",mu,mu); }
#include "colors.inc" #include "skies.inc" #include "textures.inc" #include "functions.inc" // camera----------------------------------------------------------- #declare Cam1 =camera {location <7 , 4 ,18> look_at <0.2 , 0.0 , 0.0> angle 40} camera{Cam1} //<---1 // sun ------------------------------------------------------------- light_source{<1500,2000,2500> color White*0.7} light_source{<100, 100, 200> color White*0.5} background { color rgb <0,0,0> } #macro SP(x0,y0,z0,r0) sphere { < x0,y0,z0 >, r0 pigment { Gold}//rgb <1,1,1> } finish { reflection .5 phong .7 }} #end global_settings { assumed_gamma 1.0 } sky_sphere { pigment { gradient y color_map { [0.0 rgb <0,0,0>] // [0.0 rgb <0.6,0.7,1.0>] [0.2 rgb <0.2,0.3,0.9>] } } } plane { y, -7 texture { pigment { checker color rgb 1, color rgb 0 } } }
Output_File_Type=N Width=500 Height=500 Quality=11 Antialias=on Antialias_Threshold=0.001
#!/usr/bin/perl for($num=1000; $num<=1200; $num++){ system("./doub $num"); $number=$num+1000; $file=$number.".pov"; system("cat temp.pov > $file"); system("cat $num >> $file"); system("cat rossy >> $file"); system("povray all.ini $file Display=False");}