Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dagbrown/118047 to your computer and use it in GitHub Desktop.
Save dagbrown/118047 to your computer and use it in GitHub Desktop.
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