Kamil Ondrousek
/
Pickover
Pickover fractal map
Diff: main.cpp
- Revision:
- 0:db74f9c82799
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Jan 21 17:41:09 2011 +0000 @@ -0,0 +1,41 @@ +#include "TFT_4DGL.h" + +TFT_4DGL lcd(p9,p10,p11); + +int main() { + + int xp,yp; + + int n = WHITE; + + float x,y,z; + + float a = -0.75; + float b = 2.44; + float c = 1.25; + float d = 1.5; + + float x1 = 0.1; + float y1 = -0.4; + float z1 = 0.1; + + while(1) + + { + + x = sin(a*y1)-z1*cos(b*x1); + y = z*sin(c*x1)-cos(d*y1); + z = sin(x1); + + xp = (int)floor(x*265); + yp = (int)floor(y*245); + + lcd.pixel(80+xp,270+yp,n); + + x1 = x; + y1 = y; + z1 = z; + + } + +} \ No newline at end of file