Last active
December 23, 2021 15:14
-
-
Save virusdave/af7ba656d67499645e08959e6c08eb44 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
XL=-2.0;XH=1;YL=-1;YH=1;MI=500;MC=7;X=$COLUMNS;Y=$LINES; for ((y=0;y<$Y;y++)); do for ((x=0;x<$X;x++)); do | |
R=$(echo "define g(){scale=10;v=x=((${XH}-(${XL}))*${x}/${X}+(${XL}));w=y=-((${YH}-(${YL}))*${y}/${Y}+(${YL}));for(i=1;i<${MI};i++){a=v*v-w*w+x;b=2*v*w+y;v=a;w=b;if(v*v+w*w>4){scale=0;return (${MC}-l(i)*(${MC}-1)/l(${MI}))};};return (0)}g()"|bc -l);echo -n -e "\e[4${R}m \e[0m";done;echo;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Left it running overnight, when I came back it had lots of black scan lines, resized the terminal window a few times and this is the best I could make it look on my 8k monitor with the smallest font size possible.
It seems
$COLUMNS
has a maximum value of2048
in bash.