initial import
[ICEs.git] / 200089 / mandel.i.2
1 const int MAXX = 1000, MAXY = 1000;
2 void mandel(double _Complex Zin, double _Complex C, int mits)
3 {
4 int its = 0;
5 int px;
6 int py;
7 double _Complex Z = 0 + 0;
8 for (py = 0; py != 1000; py++) {
9 for (px = 0; px != MAXX; px++) {
10 C = 4.0 * ((double)px / (double)MAXX) - 2.0 + (__extension__ 1.0iF) * (4.0 * ((double)py / (double)MAXY) - 2.0);
11 while (its < mits) {
12 Z = Z * Z + C;
13 if (cabs(Z) > 2)
14 break;
15 }
16 }
17 }
18 }