A Rossler Lorenz fusion.
-Animation by Timothy Jones
#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.005;
double a = 10.0;
double b = 28.0;
double c = 8.0 / 3.0;
double aa=0.2;
double bb=0.2;
double cc=5.7;
x0 = 0.1;
y0 = 0;
z0 = 0;
for (i=0;i< N;i++) {
x1 = x0 + h * (a * (y0 - x0) + cos(6.28*(x0/18)*(y0/18)*(z0/38))*(-y0-z0));
y1 = y0 + h * ((x0 * (b - z0) - y0) + cos(6.28*(x0/18)*(y0/18)*(z0/38))*(x0 + aa*y0));
z1 = z0 + h * ((x0 * y0 - c * z0) + cos(6.28*(x0/18)*(y0/18)*(z0/38))*(bb+z0*(x0-cc)));
x0 = x1;
y0 = y1;
z0 = z1;
if (i > 1000)
fprintf(fp,"Sp(%f, %f, %f, 0.5,1) \n",x0,y0,z0);
}
// double X = x0 - 1*sin(1.0*N/100);
// double Y = y0 + 1.4 + 1*sin(1.0*N/100); ;
// double Z = z0 + 10*sin(1.0*N/100)*sin(1.0*N/100) + 0.1;
// fprintf(fp, "camera {location <%f, %f, %f> look_at <%f, %f,%f>}\n",X,Y,Z, x0,y0,z0);
}
Output_File_Type=N Width=500 Height=500 Quality=9 Antialias=on Antialias_Threshold=0.001 Initial_Frame=1 Final_Frame=700 Initial_Clock=0 Final_Clock=40
#include "colors.inc"
#include "textures.inc"
light_source{<90,200,-150> color White*0.7}
light_source{<-60, 100,100> color Gold*0.7}
background {
color rgb < 0,0,0 >
}
#macro Sp(x0,y0,z0,rad,col)
sphere {
< x0,y0,z0 >, rad
pigment{ rgb<0.7,1,1>}
finish { reflection .7 phong .6 } }
#end
camera {location look_at <0, 0,0>}
#> g++ -o loross loross.c #> ./loross 50000 #> cat temp.pov > 50000.pov #> cat 50000 >> 50000.pov #> povray lr.ini 50000.pov Display=False