Created
February 12, 2012 21:47
-
-
Save mridgers/1811009 to your computer and use it in GitHub Desktop.
Mandelbrot set generator in 332 bytes of batch script (with Unix line endings).
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
@echo off | |
setlocal enabledelayedexpansion | |
set r=set /a | |
for /l %%y in (-16,1,16) do ( | |
set l= | |
for /l %%x in (-57,1,21) do ( | |
set u=0 | |
set v=0 | |
set "j=M.-+l$?+*:="'~-. " | |
for /l %%i in (0,1,15) do ( | |
%r% m=u*u/256 | |
%r% n=v*v/256 | |
%r% o=m+n | |
if !o! lss 999 ( | |
%r% v=2*u*v/256+%%y*20 | |
%r% u=m-n+%%x*9 | |
set j=!j:~1! | |
)) | |
set l=!l!!j:~0,1! | |
) | |
echo !l! | |
) |
Ha, nope! Fairly straight forward though to add that option though by changing out the "_20" and "_9".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice. Can i pass some args to zoom in?