Slice through torus animation using POVRAY of 3 cover of torus.
A torus is outlined by a quasiperiodic flow on it. This flow is on the ''image'' torus. The flow is lifted to double and triple covers using a rotational symmetry axis as outlined in Phys. Rev. E63, 016206 (2001). The lifted flow outlines a strange geometrical structure that we playfully call a 'donut' or a 'trinut'. The geometrical structure changes as the rotation axis ''slices'' through the original quasiperiodic flow on the image torus. The simulations show how the covering flow changes as the rotation axis moves from outside to inside the image torus.
-Animation by Timothy Jones
run.pl
#!/usr/bin/perl $num=501; #for($num=223; $num<=1000; $num++){ #$file=$num.".pov"; #system("./torus $num"); #system("cat temp.pov > $file"); #system("cat donut.dat >> $file"); #system("cat $num >> $file"); } for($num=223; $num<=1000; $num++){ $file=$num.".pov"; system("povray all.ini $file Display=False");}
#include "colors.inc" #include "textures.inc" // camera----------------------------------------------------------- #declare Cam1 =camera {location <-3 , 3.4 ,-5.8> look_at <0.2 , 0.0 , 0.0>} camera{Cam1} //<---1 // sun ------------------------------------------------------------- light_source{<1500,2000,-2500> color White*0.7} light_source{<-100, 100,-200> color Yellow*0.7} //global_settings { // ambient_light // rgb <0,0,1> //} background { color rgb <0,0,0> } #macro SP(x0,y0,z0,r0) sphere { < x0,y0,z0 >, r0 pigment { rgb <1,1,1> } finish { reflection .5 phong .7 }} #end
#include < stdlib.h > #include < math.h > #include < fstream.h > #include < iostream.h > #include < cstdio > //Adaptation of a Bob Gilmore program //written in f int main(int argc, char *argv[]){ int fiii= atoi(argv[1]); float iii=1.0*fiii/10; printf("%i \n",fiii); int i,nn,m,ord,j; nn=75000; double pi,r1,r2; double phi,alpha,beta,theta; double u,v,z,r,x,y,angle,oldang; double uu,zz,aa,bb; double orig [nn][3]; double u0,v0,eps1,eps2,rr,renorm [nn][3]; double delu,delv,rat; ///////////////////////////////////PART ONE////////////// pi = 3.1415926535; alpha = 1.0/12.52;// !!! 1.0/25.1 aa = 0.45; //!!! 0.85 bb = sqrt(1.0-aa*aa); r1 = 1.0; FILE * fp; fp = fopen ("donut.dat","w"); for(i=1; i<=nn;i++){ // !!! nn/1000= numbor of wraps in long. dir. theta = i*(2*pi)/1000.0; phi = alpha*theta; // !!! quasiperiodic ratio r2 = 2.0 + r1*cos(phi); // !!! distinace from origin uu = r2*cos(theta); // !!! (uu,v,zz) coordinates v = r2*sin(theta); // zz = r1*sin(phi); u = aa*uu - bb*zz; // !!! rotation in (uu,zz) plane z = bb*uu + aa*zz; orig[i][1]=u; // !!! output coordinate triple orig[i][2]=v; orig[i][3]=z; fprintf(fp, "SP(%f, %f, %f, 0.05)\n",u,v,z + 10);} fclose(fp); /////////////////////////////////////END P.1//////////////// /////////////////////////////////////Momma loop///////////// // u0 =-1.8; //!!! coordinates of roation axis // v0 = 0.0; //for(iii=0; iii<=100; i++){ // originally iii*0.01 --> 0.0001 so that it goes from 0-10 effectively u0 = -3.0 + (iii*0.01)*(4+3); v0 = 0.0; //cylinder {<-3,0,7+(clock/1000)*7>,<3,0,7+(clock/1000)*7>,.1 texture{pigment{color Red} finish {ambient 0.15 diffuse 0.75 reflection 0.1 phong 1}}} /////////////////////////////////////PART 2///////////////// eps1=0.001; eps2=0.01; for(i=1;i<=nn;i++){ renorm[i][3]=orig[i][3]; delu = orig[i][1]-u0; delv = orig[i][2]-v0; rr = sqrt(delu*delu+delv*delv); if(rr>eps2){ renorm[i][1]=orig[i][1]; renorm[i][2]=orig[i][2];} if(rreps1)&&(rr 1.3)){m=m+1;} if((angle > 1.3) && (oldang < -1.3)){m=m-1;} oldang = angle; angle = angle+m*pi; x = pow(r,(1/(1.0*ord)))*cos(angle/ord); y = pow(r,(1/(1.0*ord)))*sin(angle/ord); fprintf(fp2,"SP(%f, %f, %f, 0.05)\n",x,y,z-1); // write(13,'(3f12.6)')x,y,z } //For the cylinder fprintf(fp2,"cylinder {<%f,0,5>,<%f,0,27>,.1 texture{pigment{color Red} finish {ambient 0.15 diffuse 0.75 reflection 0.1 phong 1}}}\n",u0,u0); fclose(fp2); /// cylinder {<-3,0,7+(clock/1000)*7>,<3,0,7+(clock/1000)*7>,.1 texture{pigment{color Red} finish {ambient 0.15 diffuse 0.75 reflection 0.1 phong 1}}} /////////////////////////////////////END 3///// // } ///END MAMMA }