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-21
- Revision:
- 0:db74f9c82799
File content as of revision 0:db74f9c82799:
#include "TFT_4DGL.h"
TFT_4DGL lcd(p9,p10,p11);
int main() {
int xp,yp;
int n = WHITE;
float x,y,z;
float a = -0.75;
float b = 2.44;
float c = 1.25;
float d = 1.5;
float x1 = 0.1;
float y1 = -0.4;
float z1 = 0.1;
while(1)
{
x = sin(a*y1)-z1*cos(b*x1);
y = z*sin(c*x1)-cos(d*y1);
z = sin(x1);
xp = (int)floor(x*265);
yp = (int)floor(y*245);
lcd.pixel(80+xp,270+yp,n);
x1 = x;
y1 = y;
z1 = z;
}
}