Skip to main content
1 of 2
agent-j
  • 175
  • 1
  • 6

Here's a coffee-script answer running on node.js:

ascii_mandel_color

n='\u001b[0m'
m=(x,y)->
 a=x
 b=y
 z=0
 for i in [0..999]
  if z > 4
    return '\u001b[33m*'+n if i > 100
    return '\u001b[34m-'+n if i > 10
    return '\u001b[31m.'+n if i > 5
    return ' '
  l=y*y
  z=x*x+l
  y=2*x*y+b
  x=x*x-l+a
 '\u001b[32m@\u001b[0m'
console.log (m x,y for x in [-1.5..0.5] by 2/79).join '' for y in [-1.3..1.3] by 2.6/40
agent-j
  • 175
  • 1
  • 6