Kamil Ondrousek
/
QuadrupTwo
QuadrupTwo fractal map
Diff: main.cpp
- Revision:
- 0:134c94347c5a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jan 20 21:56:52 2011 +0000 @@ -0,0 +1,48 @@ +#include "TFT_4DGL.h" + +TFT_4DGL lcd(p9,p10,p11); + +int main() { + + int xp,yp; + + int n = WHITE; + int m = 0; + + float x,y; + + float a = 34; + float b = 0.9; + float c = 5; + + float x1 = 1; + float y1 = 0; + + while(1) + + { + + x = y1 - (x1/x1) * sin(log(abs(b * x1 - c))) * atan(abs((pow(c * x1 - b,2)))); + y = a-x1; + + xp = (int)floor(3*x); + yp = (int)floor(3*y); + + m++; + + if (m==300) { + + m = 0; + + n = rand(); + + } + + lcd.pixel(70+xp,110+yp,n); + + x1 = x; + y1 = y; + + } + +} \ No newline at end of file