Kamil Ondrousek / Mbed 2 deprecated Rabinovich

Dependencies:   mbed

Committer:
JLS
Date:
Mon Dec 27 21:32:10 2010 +0000
Revision:
0:26bcd4640f94

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JLS 0:26bcd4640f94 1 #include "TFT_4DGL.h"
JLS 0:26bcd4640f94 2
JLS 0:26bcd4640f94 3 TFT_4DGL lcd(p9,p10,p11);
JLS 0:26bcd4640f94 4
JLS 0:26bcd4640f94 5 int main() {
JLS 0:26bcd4640f94 6
JLS 0:26bcd4640f94 7 double x1,y1,z1,x,y,z,t,dt;
JLS 0:26bcd4640f94 8 int xp,yp;
JLS 0:26bcd4640f94 9
JLS 0:26bcd4640f94 10 float a = 0.84;
JLS 0:26bcd4640f94 11 float b = 1.1;
JLS 0:26bcd4640f94 12
JLS 0:26bcd4640f94 13 x1 = 1.1881;
JLS 0:26bcd4640f94 14 y1 = 0;
JLS 0:26bcd4640f94 15 z1 = 0.4;
JLS 0:26bcd4640f94 16
JLS 0:26bcd4640f94 17 dt = 0.005;
JLS 0:26bcd4640f94 18
JLS 0:26bcd4640f94 19 while(1)
JLS 0:26bcd4640f94 20
JLS 0:26bcd4640f94 21 {
JLS 0:26bcd4640f94 22
JLS 0:26bcd4640f94 23 x = x1+(y1*(z1-1+pow(x1,2))+a*x1)*dt;
JLS 0:26bcd4640f94 24 y = y1+(x1*(3*z1+1-pow(x1,2))+a*y1)*dt;
JLS 0:26bcd4640f94 25 z = z1+(-2*z1*(b+x1*y1))*dt;
JLS 0:26bcd4640f94 26 t = t+dt;
JLS 0:26bcd4640f94 27
JLS 0:26bcd4640f94 28 xp = -25+(int)floor(135*x);
JLS 0:26bcd4640f94 29 yp = 270+(int)floor(105*y);
JLS 0:26bcd4640f94 30
JLS 0:26bcd4640f94 31 lcd.pixel(xp,yp,WHITE);
JLS 0:26bcd4640f94 32
JLS 0:26bcd4640f94 33 x1 = x;
JLS 0:26bcd4640f94 34 y1 = y;
JLS 0:26bcd4640f94 35 z1 = z;
JLS 0:26bcd4640f94 36
JLS 0:26bcd4640f94 37 }
JLS 0:26bcd4640f94 38
JLS 0:26bcd4640f94 39 }