summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--attract.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/attract.c b/attract.c
index 7a31bb9..9e093ec 100644
--- a/attract.c
+++ b/attract.c
@@ -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;