#ruby Mendelbrot 1924-2010 require 'chunky_png' png = ChunkyPNG::Image . new ( 513 , 257 , ChunkyPNG::Color::TRANSPARENT ) ( - 128 .. 128 ) . each { | c | ( - 256 .. 256 ) . each { | d | a = b = 0.0 result = ( 1 .. 70 ) . each_with_index . find { t = a * b a * = a b * = b a = a - b + d / 256.0 - 0.5 ; b = 2 * t + c / 128.0 ; a + b > 2 || ( a + b ) . nan ? } png [ d + 256 , c + 128 ] = result ? ChunkyPNG::Color . rgba ( 0 , ( result. last * 2.55 ) . to_i , 0 , 255 ) : ChunkyPNG::Color ( 'black' ) } } png. write ( STDOUT )

I3J1YnkgTWVuZGVsYnJvdCAxOTI0LTIwMTAKcmVxdWlyZSAnY2h1bmt5X3BuZycKCnBuZyA9IENodW5reVBORzo6SW1hZ2UubmV3KDUxMywgMjU3LCBDaHVua3lQTkc6OkNvbG9yOjpUUkFOU1BBUkVOVCkKCigtMTI4Li4xMjgpLmVhY2ggeyB8Y3wKICAoLTI1Ni4uMjU2KS5lYWNoIHsgfGR8CiAgICBhID0gYiA9IDAuMAogICAgcmVzdWx0ID0gKDEuLjcwKS5lYWNoX3dpdGhfaW5kZXguZmluZCB7IAogICAgICB0ID0gYSAqIGIKICAgICAgYSAqPSBhCiAgICAgIGIgKj0gYgogICAgICBhID0gYSAtIGIgKyBkIC8gMjU2LjAgLSAwLjU7CiAgICAgIGIgPSAyICogdCArIGMgLyAxMjguMDsKICAgICAgYSArIGIgPiAyIHx8IChhICsgYikubmFuPwogICAgfQogICAgcG5nW2QgKyAyNTYsIGMgKyAxMjhdID0gcmVzdWx0ID8gQ2h1bmt5UE5HOjpDb2xvci5yZ2JhKDAsIChyZXN1bHQubGFzdCAqIDIuNTUpLnRvX2ksIDAsIDI1NSkgOiBDaHVua3lQTkc6OkNvbG9yKCdibGFjaycpCiAgfQp9Cgpwbmcud3JpdGUoU1RET1VUKQ==