Kamil Ondrousek / Mbed 2 deprecated Rabinovich

Dependencies:   mbed

main.cpp

Committer:
JLS
Date:
2010-12-27
Revision:
0:26bcd4640f94

File content as of revision 0:26bcd4640f94:

#include "TFT_4DGL.h"

TFT_4DGL lcd(p9,p10,p11);

int main() {

    double x1,y1,z1,x,y,z,t,dt;
    int   xp,yp;
   
    float a = 0.84;
    float b = 1.1; 

    x1 = 1.1881;
    y1 = 0;
    z1 = 0.4;
    
    dt = 0.005;

    while(1)
    
    {
    
        x = x1+(y1*(z1-1+pow(x1,2))+a*x1)*dt;
        y = y1+(x1*(3*z1+1-pow(x1,2))+a*y1)*dt;
        z = z1+(-2*z1*(b+x1*y1))*dt;
        t = t+dt;

        xp = -25+(int)floor(135*x);
        yp = 270+(int)floor(105*y);

        lcd.pixel(xp,yp,WHITE);
      
        x1 = x;
        y1 = y;
        z1 = z;

    }
 
}