From 4983354a6e0a2e690c02864d72f1c03ed3699f68 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Wed, 5 Apr 2017 21:40:35 +0200 Subject: Colour argument And some random changes --- attract.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/attract.c b/attract.c index 87ca6a1..c4cba5c 100644 --- a/attract.c +++ b/attract.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -16,19 +17,16 @@ const int MAXITER=200; const double EPS=1e-1; static double complex att_func(double complex x,double exponent){ -#if 0 - static const int N=9; - - double complex r=1,y=x; - for(int i=1;iN)norm=N; - int clrv=(int)(norm/N*255); - return (struct colour){clrv,clrv,clrv}; + int normclr=(int)(norm/N*255); + int argclr=(int)((carg(z)+M_PI)/(2*M_PI)*255); + return (struct colour){normclr,argclr,0}; } struct config{ @@ -116,9 +115,9 @@ static void* thread_entry(void *arg_vp){ } int main(int argc,char **argv){ - const double minx=-1.5,miny=-1.5; - const double maxx=1.5,maxy=1.5; - const double width=500; + const double minx=-3,miny=-3; + const double maxx=3,maxy=3; + const double width=1000; struct config cfg={ .unitsz=width/(maxx-minx), -- cgit v1.2.3-70-g09d2