/* !!DESCRIPTION!! mandelbrot test program !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! Groepaz/Hitmen */ #include #include static unsigned short SCREEN_X; static unsigned char SCREEN_Y; #define MAXCOL 8 #define maxiterations 16 #define fpshift (12) #define tofp(_x) ((_x)<>fpshift) #define fpabs(_x) (abs(_x)) #define mulfp(_a,_b) ((((signed long)_a)*(_b))>>fpshift) #define divfp(_a,_b) ((((signed long)_a)<>(fpshift-1))+yy; r=r1; } if(count==maxiterations) { printf(" "); } else { printf("%c",dither[(count%MAXCOL)]); } } printf("\n"); } } int main (void) { SCREEN_X = 80; SCREEN_Y = 40; /* calc mandelbrot set */ mandelbrot(tofp(-2),tofp(-2),tofp(2),tofp(2)); /* Done */ return 0; }