#include #include double X,Y,R,o,i,j,k,z,d,e,x,y,t,u,r;int main(void){for(;k<=1.005;k+=.005){X=- .5+k*-0.756;Y=k*.38;R=2+k*-1.98;o=k*6.18;for(j=0;j<240;j++)for(i=0;i<320;i++){ x=i*R/120+X-R*4/3;y=j*-R/120+Y+R;d=(x-X)*cos(o)-(y-Y)*sin(o)+X;e=(x-X)*sin(o)+ (y-Y)*cos(o)+Y;x=d;y=e;r=0;for(z=255;z>0&&r<=4;z--){t=x*x-y*y+d,u=2*x*y+e,r=t* t+u*u;x=t;y=u;}z=z>232||z<128?0:z>200?(256-z)*2:z-100;putchar(z);}}fflush( stdout);return 0;} /* gcc -Wall mandelbrot-zoom.c -O3 -ffast-math -lm ./a.out > /tmp/A ffmpeg -f rawvideo -s 320x240 -r 25 -pix_fmt gray -i /tmp/A -vf scale=1024:768 -sws_flags neighbor -vcodec libvpx-vp9 -b:v 1M /tmp/A.webm */