fork(34) download
  1. #ruby Mendelbrot 1924-2010
  2. require 'chunky_png'
  3.  
  4. png = ChunkyPNG::Image.new(513, 257, ChunkyPNG::Color::TRANSPARENT)
  5.  
  6. (-128..128).each { |c|
  7. (-256..256).each { |d|
  8. a = b = 0.0
  9. result = (1..70).each_with_index.find {
  10. t = a * b
  11. a *= a
  12. b *= b
  13. a = a - b + d / 256.0 - 0.5;
  14. b = 2 * t + c / 128.0;
  15. a + b > 2 || (a + b).nan?
  16. }
  17. png[d + 256, c + 128] = result ? ChunkyPNG::Color.rgba(0, (result.last * 2.55).to_i, 0, 255) : ChunkyPNG::Color('black')
  18. }
  19. }
  20.  
  21. png.write(STDOUT)
Success #stdin #stdout 14.98s 10400KB
stdin
Standard input is empty
stdout
ne{RJX8P,6sC}"q^v ,-PΎr2@)ȚmV[d>.2udX H<|sgtS,tK{ϷH'*U濱hRX2 @5cj0 ֦mC„WǾunKl,LtrZxI1HgW- E v з6룸vg0|gK{\hSZH{f'tUyMb`:*uO'=N7(a 7ڡs )@Jrdr*eB(G3">HՅLaw]q_?{2}6oeL0wJdH[0Ka$LBRLlǰ<7@YS;cVފ fʼn7K@i`o-gI­]Ϧ2WW;KdX.8rf wTg\l7t>*biN,gn Lk*4PxΞxuq/}^@ д<{Qa,^PfI1`\q*'>7N괰VMBIf g gZ!_6Јa*z7c `U1& aI `I^jUWJET`Xʋ{?pL Luȼ:+n"ZicXO${W틀sxA1}z<̦BHKծ =TJ[7X Fx#8%I8Y\5Iv Glp0^;X#E \4-M~tq"[s+h阮Z7e7Za T^gj+)"#u1i{$ŃnètP~l屢E! 4 ;Amy\bE.jvX$׉CU)K{v[d$m(Rt0Q MZ$) 'ExS8 ya:1 ?2ƙUdH&Ry=eG}@;Uhl'Qw2z xW1ndT&hP3Ak,p@t`rH*;cs @hF^tŰa`s~ujhlxg){QX5M;,{~bBRYIZ7Vb@\S [ԇiN_;Z/T}(oŴR!L}CFtÞܺ @ʾ|u, Dku u DPtZoo,7Ā`))H=#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