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:17a1e0dcb266
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jan 04 20:40:50 2011 +0000 @@ -0,0 +1,40 @@ +#include "TFT_4DGL.h" + +TFT_4DGL lcd(p9,p10,p11); + +int main() { + + double x1,y1,z1,x,y,z,dt; + int xp,yp; + + float a = 0.1; + float b = 4; + float c = 14; + float d = 0.08; + + x1 = 0; + y1 = 1; + z1 = 0; + + dt = 0.005; + + while(1) + + { + + x = x1+(-a*x1+pow(y1,2)-pow(z1,2)+a*c)*dt; + y = y1+(x1*(y1-b*z1)+d)*dt; + z = z1+(-z1+x1*(b*y1+z1))*dt; + + xp = 170+(int)floor(21*x); + yp = 130+(int)floor(12*y); + + lcd.pixel(yp,xp,WHITE); + + x1 = x; + y1 = y; + z1 = z; + + } + +} \ No newline at end of file