Skip to content

Instantly share code, notes, and snippets.

@tylorr
Created November 28, 2018 06:42
Show Gist options
  • Select an option

  • Save tylorr/6e0b960eb7dec3cd1a053cb642785f7a to your computer and use it in GitHub Desktop.

Select an option

Save tylorr/6e0b960eb7dec3cd1a053cb642785f7a to your computer and use it in GitHub Desktop.
//&>/dev/null;x="${0%.*}";[ ! "$x" -ot "$0" ]||(rm -f "$x";gcc -o "$x" "$0")&&exec "$x" "$@"
main(){float A,B,P,Q,X,Y,d;int i,D=80,n=3120;for(X=-2.,Y=-1.5,d=6./D;B=2*A
*B+Y,A=P-Q+X,n;((P=A*A)+(Q=B*B)>4||++i>D)&&putchar(*((n--%D?X+=d/2,i<D?i%11
:11:(X=-2.0,Y+=d,12))+"Mandelbrot! \n"))&&(A=B=P=Q=i=0));}
@tylorr
Copy link
Author

tylorr commented Dec 1, 2018

I'm not original author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment