Fractal-Dream chaotic map

main.cpp

Committer:
JLS
Date:
2011-01-17
Revision:
0:e3b298a12eea

File content as of revision 0:e3b298a12eea:

#include "TFT_4DGL.h"

TFT_4DGL lcd(p9,p10,p11);

int main() {
   
    double  a,b,c,d,x,y,xa,ya;

    int xout = 0;
    int yout = 0;
    
    a = -0.966918;
    b = 2.879879;
    c = 0.765145;
    d = 0.744728;

    xa = 0.1;
    ya = 0.1;
    
 
 while (1) {
 
    x = sin(ya*b)+c*sin(xa*b);
    y = sin(xa*a)+d*sin(ya*a);
  
    xout = 120+(x*60);
    yout = 160+(y*95);
   
    lcd.pixel(xout,yout,WHITE);
    
    xa = x;
    ya = y;
}
}