diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-04-05 22:59:06 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-04-05 22:59:06 +0200 |
commit | f84e1814e1fe0e216eecd7bfe98a422e4144ee56 (patch) | |
tree | e63c4cc12d5784d2b90ff1a76d8602182ddf630c | |
parent | e6613ad22bf7fa6da52609136c4c7630cc2f3a4b (diff) |
Render mandelbrots
-rw-r--r-- | attract.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -17,11 +17,12 @@ const int MAXITER=200; const double EPS=1e-1; -static double complex att_func(double complex x,double exponent){ - return clog((1-cpow(x,exponent+1))/(1-x)); +static double complex att_func(double complex x,double exponent,double complex start){ + // return clog((1-cpow(x,exponent+1))/(1-x)); // return x; - return x*x+CMPLX(-0.2,0.7); + // return x*x+CMPLX(-0.2,0.7); + return x*x+start; // return csqrt(M_SQRT2*x); // sqrt(2) and 0 // return csqrt(1+x); // phi @@ -100,7 +101,7 @@ static void* thread_entry(void *arg_vp){ cfg.midy-(double)(iy-cfg.height/2)/cfg.unitsz); double complex z=start; for(int i=0;i<MAXITER;i++){ - z=att_func(z,cfg.exponent); + z=att_func(z,cfg.exponent,start); } if(do_basins){ int bi; |