Polynomial Type B - fractal map

Revision:
0:25eda589d3ce
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jan 22 19:01:46 2011 +0000
@@ -0,0 +1,43 @@
+#include "TFT_4DGL.h"
+
+TFT_4DGL lcd(p9,p10,p11);
+
+int main() {
+
+     int   xp,yp;
+     
+     int n = WHITE;
+   
+     float x,y,z;
+
+     float a = -0.237;
+     float b = 0.453;
+     float c = 0.486;
+     float d = 0.616;
+     float e = 1.141;
+     float f = 0.483;
+  
+     float x1 = 1;
+     float y1 = 1;
+     float z1 = 1;
+
+    while(1)
+    
+    {
+    
+        x = a+y1-z1*(b+y1);
+        y = c+z1-x1*(d+z1);
+        z = e+x1-y1*(f+x1);
+
+        xp = (int)floor(x*80);
+        yp = (int)floor(y*80);
+
+        lcd.pixel(110+xp,70+yp,n);
+      
+        x1 = x;
+        y1 = y;
+        z1 = z;
+        
+    }
+ 
+}
\ No newline at end of file