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:
- 2010-12-27
- Revision:
- 0:26bcd4640f94
File content as of revision 0:26bcd4640f94:
#include "TFT_4DGL.h"
TFT_4DGL lcd(p9,p10,p11);
int main() {
double x1,y1,z1,x,y,z,t,dt;
int xp,yp;
float a = 0.84;
float b = 1.1;
x1 = 1.1881;
y1 = 0;
z1 = 0.4;
dt = 0.005;
while(1)
{
x = x1+(y1*(z1-1+pow(x1,2))+a*x1)*dt;
y = y1+(x1*(3*z1+1-pow(x1,2))+a*y1)*dt;
z = z1+(-2*z1*(b+x1*y1))*dt;
t = t+dt;
xp = -25+(int)floor(135*x);
yp = 270+(int)floor(105*y);
lcd.pixel(xp,yp,WHITE);
x1 = x;
y1 = y;
z1 = z;
}
}