Gingerbreadman fractal map

Dependencies:   mbed

Committer:
JLS
Date:
Sat Dec 25 13:49:40 2010 +0000
Revision:
0:eec1e0cd07a1
Child:
1:49e438c33468

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JLS 0:eec1e0cd07a1 1 #include "TFT_4DGL.h"
JLS 0:eec1e0cd07a1 2
JLS 0:eec1e0cd07a1 3 TFT_4DGL lcd(p9,p10,p11);
JLS 0:eec1e0cd07a1 4
JLS 0:eec1e0cd07a1 5 int main() {
JLS 0:eec1e0cd07a1 6
JLS 0:eec1e0cd07a1 7 float x = 0.5;
JLS 0:eec1e0cd07a1 8 float y = 3.7;
JLS 0:eec1e0cd07a1 9
JLS 0:eec1e0cd07a1 10 int xout = 0;
JLS 0:eec1e0cd07a1 11 int yout = 0;
JLS 0:eec1e0cd07a1 12
JLS 0:eec1e0cd07a1 13 lcd.baudrate(600000);
JLS 0:eec1e0cd07a1 14
JLS 0:eec1e0cd07a1 15 while (1) {
JLS 0:eec1e0cd07a1 16
JLS 0:eec1e0cd07a1 17 double oldX = x;
JLS 0:eec1e0cd07a1 18 double oldY = y;
JLS 0:eec1e0cd07a1 19
JLS 0:eec1e0cd07a1 20 x = 1+abs(oldX)-oldY;
JLS 0:eec1e0cd07a1 21 y = oldX;
JLS 0:eec1e0cd07a1 22
JLS 0:eec1e0cd07a1 23 xout = 90+(x*28);
JLS 0:eec1e0cd07a1 24 yout = 70+(y*21);
JLS 0:eec1e0cd07a1 25
JLS 0:eec1e0cd07a1 26 lcd.pixel(yout,xout,WHITE);
JLS 0:eec1e0cd07a1 27
JLS 0:eec1e0cd07a1 28 }
JLS 0:eec1e0cd07a1 29 }