4D hyperchaotic rossler attractor

Revision:
0:276aaf2f7d38
diff -r 000000000000 -r 276aaf2f7d38 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Apr 04 16:14:50 2011 +0000
@@ -0,0 +1,51 @@
+#include "TFT_4DGL.h"
+
+TFT_4DGL lcd(p9,p10,p11);
+
+int main() {
+
+     int   xp,yp;
+     
+     int n = WHITE;
+   
+     float x,y,z,w;
+     
+     float a = 0.25;
+     float b = 3;
+     float c = 0.5;
+     float d = 0.05;
+
+     float dt = 0.005;
+  
+     float x1 = -10;
+     float y1 = -6;
+     float z1 = 0.1;
+     float w1 = 10;
+     
+     x = x1;
+     y = y1;
+     z = z1;
+     w = w1;
+
+    while(1)
+    
+    {
+    
+        x = x1+(-y1-z1)*dt;
+        y = y1+(x1+(a*y1)+w1)*dt;
+        z = z1+(b+(x1*z1))*dt;
+        w = w1+(-(c*z1)+(d*w1))*dt;
+
+        xp = (int)floor(3*x);
+        yp = (int)floor(2*y);
+
+        lcd.pixel(135+yp,260+xp,n);
+     
+        x1 = x;
+        y1 = y;
+        z1 = z;
+        w1 = w;
+
+    }
+ 
+}
\ No newline at end of file