Lozi fractal map

main.cpp

Committer:
JLS
Date:
2010-12-25
Revision:
0:c883783e1e12
Child:
1:89b1a06c1828

File content as of revision 0:c883783e1e12:

#include "TFT_4DGL.h"

TFT_4DGL lcd(p9,p10,p11);

int main() {
   
    float a = 1.7;
    float b = 0.5;

    float x = -0.1;
    float y = 0.1;

    int xout = 0;
    int yout = 0;

   lcd.baudrate(600000);
 
 while (1) {
 
    double oldX = x;
  
    x = 1-a*abs(oldX)+b*y;
    y = oldX;
  
    xout = 160+(x*100);
    yout = 120+(y*80);
   
    lcd.pixel(yout,xout,WHITE);
  
}
}