Skip to content

Instantly share code, notes, and snippets.

@jeremy-rifkin
Last active February 8, 2021 23:47
Show Gist options
  • Select an option

  • Save jeremy-rifkin/5df33dc9c1c25bb361eeda6d8cc14f8a to your computer and use it in GitHub Desktop.

Select an option

Save jeremy-rifkin/5df33dc9c1c25bb361eeda6d8cc14f8a to your computer and use it in GitHub Desktop.
137 char mandelbrot code golf
// 137 char mandelbrot code golf
// collaboration by myself and others on a programming discord server
y=40,x;main(i){for(;y--;puts(""))for(x=170;x--;printf(L" .'-+=%@#"+i/12))for(typeof(0.i)z=i=0;cabs(z)<2&i++<99;z=z*z-x/50.+y/20.i+1+1i);}
// 130 char, lower-detail:
y=40,x;main(i){for(;--y;puts(""))for(x=170;x--;printf(L" *"+i/99))for(typeof(0.i)z=i=0;cabs(z)<2&i++<98;z=z*z-x/50.+y/20.i+1+1i);}
// compiler: gcc, may need -lm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment