#include #include int main(void) { double x=0.0, y=0.0, z=0.0, xx, yy, zz; /* set up some constants. To see a chaotic attractor, try: A=2.24, B=0.43, C=-0.65, D=-2.43, E=1.0 */ double A = 2.0; double B = 0.5; double C = -1.0; double D = -1.0; double E = 2.0; int loop; /* iterate the attractor 120 times. */ for( loop=0; loop<120; loop++) { printf( "%d : %f, %f, %f\n", loop, (float)x, (float)y, (float)z); xx = sin(A*y) - z*cos(B*x); yy = z*sin(C*x) - cos(D*y); zz = E*sin(x); x=xx; y=yy; z=zz; } }