Jeb: that is awesome!
Mandelbrot Set color bands in the "sea" becomes narrow as we approach to the "land" (the black area). To compensate for this effect, several bands must be joined in the same color as the iteration level increases.
I wrote a very small and fast program to show text in color I called COLORMSG to differentiate it from your COLORTEXT. It is a .COM file with just 181 bytes in size, so it run much faster than other methods that do the same thing. Here it is:
³2ÿŠOÿ2íã9‹û° üó®tQã~ŠEÿ³$þÇS³ÿãën€= tsÐàÐàÐàÐàŠàGŠEÿ³<Sëq³A€/!+ÄIãN2äP¸""ò®uDãB‹÷‹Ñò®u@J:%u;GIuó+Ñt-‹Ê³|€/!³†€/![° ´*€ì!Í1²"¬´/€ì!Í1:Âu—Šâ:$u‘Fâë2À´LÍ!ëÇë¦,0Ã<Arù²ùöÚ*Âëñ<arð, ëì
Just take the previous 181 bytes and store they in a file called COLORMSG.COM; you may first create COLORMSG.TXT and then do a REN COLORMSG.TXT COLORMSG.COM. Note that file contents must be comprised of a long string 181 bytes size with no line breaks, but that have white spaces in positions 15, 39, 118 and 179. The color graphic is drawn even faster if the DOS-Window is maximized with Alt-Enter key.
This is my version of Mandelbrot Set in color:
::Mandelbrot Set graphic in text mode in COLOR
::Antonio Perez Ayala
REM Working values: maximum screen coordinates and iteration level
set /A maxX=78, maxY=42, maxLevel=26, one=10000
call :IntAsFP xLeft=-1.0000
call :IntAsFP yTop= 1.1250
call :IntAsFP xRight= 2.0000
call :IntAsFP yBottom=-1.1250
set /A xStep=(xRight-xLeft)/maxX, yStep=(yBottom-yTop)/maxY, four=4*one
set showChars=█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ ▓ ▓ ▒ ▒ ▒ ░ ░ ░ ░
set showColors=1 2 3 4 5 6 7 8 9 A B C C D D D D E E E E E E E E E
set "showChar= "
for %%c in (%showChars%) do (
set /A i+=1
for %%c in (%showColors%) do (
set /A i+=1
set /A yPos=yTop-yStep
for /L %%y in (0,1,%maxY%) do (
set /A yPos+=yStep, xPos=xLeft-xStep
for /L %%x in (0,1,%maxX%) do (
set /A xPos+=xStep, xIter=xPos, yIter=yPos, xSquare=xIter*xIter/one, ySquare=yIter*yIter/one, root=xSquare+ySquare
for /L %%i in (1,1,%maxLevel%) do (
if !level! == 0 (
if !root! lss %four% (
set /A yIter=2*xIter*yIter/one-yPos, xIter=xSquare-ySquare-xPos, xSquare=xIter*xIter/one, ySquare=yIter*yIter/one, root=xSquare+ySquare
) else (
for %%l in (!level!) do ColorMsg !showColor[%%l]! "!showChar[%%l]!"
You may review the result generated here
; that image took 1 minute 42 seconds with the DOS window maximized via Alt-Enter.