Created
May 26, 2009 12:51
-
-
Save dagbrown/118047 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require "complex"; class Complex; def m; z=self; 1024.times {|i|z=z*z+self; | |
return i+1 if z.abs>2};return 1024 end end;(1.0).step(-1,-0.05) do |y| | |
(-2.0).step(0.5,0.0315) do |x| print " .,:;~=/$@#"[(Math.log(Complex(x,y).m)/ | |
Math.log(2)).to_i].chr end; puts end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment