Modified Celikovsky chaotic system

Revision:
0:3c419cd96ffd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Mar 30 19:53:40 2011 +0000
@@ -0,0 +1,56 @@
+#include "TFT_4DGL.h"
+
+TFT_4DGL lcd(p9,p10,p11);
+
+int main() {
+
+     int   xp,yp;
+     
+     int cnt = 0;
+     
+     int n = WHITE;
+   
+     float x,y,z;
+   
+     float a = 36;
+     float b = 3;
+     float c = 28.7;
+     
+     float dt = 0.001;
+ 
+     float x1 = 1;
+     float y1 = 1;
+     float z1 = 1;
+
+     
+     x = x1;
+     y = y1;
+     z = z1;
+
+    while(1)
+    
+    {
+    
+        x = x1+(a*(y1-x1))*dt;
+        y = y1+(-(x1*z1)+(c*y1))*dt;
+        z = z1+((x1*y1)-(b*z1))*dt;
+ 
+        xp = (int)floor(8*x);
+        yp = (int)floor(11*z);
+        
+        cnt ++;
+        
+        if (cnt >= 7400) {
+        
+         
+        lcd.pixel(-235+yp,160+xp,n);
+     
+     }
+     
+        x1 = x;
+        y1 = y;
+        z1 = z;
+
+    }
+ 
+}
\ No newline at end of file