Skip to content

Instantly share code, notes, and snippets.

@jonelf
Created October 22, 2012 13:21
Show Gist options
  • Save jonelf/3931476 to your computer and use it in GitHub Desktop.
Save jonelf/3931476 to your computer and use it in GitHub Desktop.
Blasted Mentor
b,a=$*;a.to_i.times{|l|puts (0..b.to_i).map{|n|x=y=i=0;(x,y,i=x*x-y*y+n/38.0-1.5,2*x*y+l/14.0-1,i+1)until(x*x+y*y>4||i>78);(32+i).chr}*""}
@jonelf
Copy link
Author

jonelf commented Oct 22, 2012

Run with:
ruby p.rb 80 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment