Polynomial Type A - fractal map

Revision:
0:858ca3848041
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jan 22 18:19:57 2011 +0000
@@ -0,0 +1,40 @@
+#include "TFT_4DGL.h"
+
+TFT_4DGL lcd(p9,p10,p11);
+
+int main() {
+
+     int   xp,yp;
+     
+     int n = WHITE;
+   
+     float x,y,z;
+
+     float a = 1.586;
+     float b = 1.124;
+     float c = 0.281;
+  
+     float x1 = 1;
+     float y1 = 1;
+     float z1 = 1;
+
+    while(1)
+    
+    {
+    
+        x = a+y1-z1*y1;
+        y = b+z1-x1*z1;
+        z = c+x1-y1*x1;
+
+        xp = (int)floor(x*80);
+        yp = (int)floor(y*160);
+
+        lcd.pixel(20+xp,80+yp,n);
+      
+        x1 = x;
+        y1 = y;
+        z1 = z;
+        
+    }
+ 
+}
\ No newline at end of file