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.
main.cpp
- Committer:
- JLS
- Date:
- 2011-01-05
- Revision:
- 0:9b22f4157ab5
File content as of revision 0:9b22f4157ab5:
#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.9;
float b = 5;
float c = 9.9;
float d = 1;
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 = 100+(int)floor(48*x);
yp = 160+(int)floor(38*y);
lcd.pixel(xp,yp,WHITE);
x1 = x;
y1 = y;
z1 = z;
}
}