n-Angle graphic demo - modified for 4DGL - original code Eric Wieser - THANKS

Dependencies:   mbed

Revision:
0:f2f097ec3172
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jan 23 19:37:03 2011 +0000
@@ -0,0 +1,45 @@
+#include "TFT_4DGL.h"
+
+TFT_4DGL lcd(p9,p10,p11);
+
+#define PI 3.14159265
+
+ int n = WHITE;
+
+struct point
+{
+    int x;
+    int y;
+};
+
+int numpoints = 1;
+point points[256];
+
+int main() {
+
+while (1)
+
+{
+     
+        for(int i=0; i<numpoints; i++)
+        {
+            points[i].x = 120+105*sin(2*PI*i/numpoints);
+            points[i].y = 160+105*cos(2*PI*i/numpoints);
+        }
+   
+        for(int i=0; i<numpoints; i++)
+        
+        {
+            for(int j=i+1; j<numpoints; j++)
+            {
+                lcd.line(points[i].x,points[i].y,points[j].x,points[j].y,n);
+            }
+        }
+        
+   wait (1);
+   lcd.cls();
+   n = rand();
+   numpoints = rand ()%20;
+   
+       }
+}
\ No newline at end of file