Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:ab96794606df
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Dec 27 20:41:27 2010 +0000
@@ -0,0 +1,39 @@
+#include "TFT_4DGL.h"
+
+TFT_4DGL lcd(p9,p10,p11);
+
+int main() {
+
+ double x1,y1,z1,x,y,z,t,dt;
+ int xp,yp;
+
+ x1 = 0.1;
+ y1 = 0;
+ z1 = 0;
+
+ float k = 6;
+ float r = 20;
+
+ dt = 0.005;
+
+ while(1)
+
+ {
+
+ x = x1+(y1)*dt;
+ y = y1+(z1)*dt;
+ z = z1+(-z1-(k-r+r*pow(x1,2))*y1-k*x1)*dt;
+ t = t+dt;
+
+ xp = 160+(int)floor(50*x);
+ yp = 120+(int)floor(15*y);
+
+ lcd.pixel(yp,xp,WHITE);
+
+ x1 = x;
+ y1 = y;
+ z1 = z;
+
+ }
+
+}
\ No newline at end of file