Last active
February 22, 2016 17:34
-
-
Save rogerkenny/a12922dcc6876dcef545 to your computer and use it in GitHub Desktop.
I challenged myself to write a tweetable one-line Mandelbrot set, and this is the result. 135 characters long, generates an ascii art Mandelbrot.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
o='',s=0.02;for(l=-1;(l+=s)<1;){for(k=-2;(k+=s)<1;){for(x=y=0,j=99;x*x+y*y<4&&--j;){a=x*x-y*y+k,y=2*x*y+l,x=a}o+=j?'#':'_'}o+='<br>'}; | |
document.write(o);document.getElementsByTagName('html')[0].style.lineHeight = 0.5; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy and paste the gist into any random browser js console.