Kamil Ondrousek
/
HyperRossler
4D hyperchaotic rossler attractor
main.cpp
- Committer:
- JLS
- Date:
- 2011-04-04
- Revision:
- 0:276aaf2f7d38
File content as of revision 0:276aaf2f7d38:
#include "TFT_4DGL.h" TFT_4DGL lcd(p9,p10,p11); int main() { int xp,yp; int n = WHITE; float x,y,z,w; float a = 0.25; float b = 3; float c = 0.5; float d = 0.05; float dt = 0.005; float x1 = -10; float y1 = -6; float z1 = 0.1; float w1 = 10; x = x1; y = y1; z = z1; w = w1; while(1) { x = x1+(-y1-z1)*dt; y = y1+(x1+(a*y1)+w1)*dt; z = z1+(b+(x1*z1))*dt; w = w1+(-(c*z1)+(d*w1))*dt; xp = (int)floor(3*x); yp = (int)floor(2*y); lcd.pixel(135+yp,260+xp,n); x1 = x; y1 = y; z1 = z; w1 = w; } }