Henon map

Committer:
JLS
Date:
Sun Jan 09 19:32:27 2011 +0000
Revision:
0:bf06c6bfac7c

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JLS 0:bf06c6bfac7c 1 #include "TFT_4DGL.h"
JLS 0:bf06c6bfac7c 2
JLS 0:bf06c6bfac7c 3 TFT_4DGL lcd(p9,p10,p11);
JLS 0:bf06c6bfac7c 4
JLS 0:bf06c6bfac7c 5 int main() {
JLS 0:bf06c6bfac7c 6
JLS 0:bf06c6bfac7c 7 float a = 1.4;
JLS 0:bf06c6bfac7c 8 float b = 0.3;
JLS 0:bf06c6bfac7c 9
JLS 0:bf06c6bfac7c 10 float x = 0.1;
JLS 0:bf06c6bfac7c 11 float y = 0;
JLS 0:bf06c6bfac7c 12
JLS 0:bf06c6bfac7c 13 int xout = 0;
JLS 0:bf06c6bfac7c 14 int yout = 0;
JLS 0:bf06c6bfac7c 15
JLS 0:bf06c6bfac7c 16 while (1) {
JLS 0:bf06c6bfac7c 17
JLS 0:bf06c6bfac7c 18 double x1 = x;
JLS 0:bf06c6bfac7c 19 double y1 = y;
JLS 0:bf06c6bfac7c 20
JLS 0:bf06c6bfac7c 21 x = y1+1-a*pow(x1,2);
JLS 0:bf06c6bfac7c 22 y = b*x1;
JLS 0:bf06c6bfac7c 23
JLS 0:bf06c6bfac7c 24 xout = 120+(80*x);
JLS 0:bf06c6bfac7c 25 yout = 160+(360*y);
JLS 0:bf06c6bfac7c 26
JLS 0:bf06c6bfac7c 27 lcd.pixel(xout,yout,WHITE);
JLS 0:bf06c6bfac7c 28
JLS 0:bf06c6bfac7c 29 }
JLS 0:bf06c6bfac7c 30 }