Created
February 4, 2016 23:58
-
-
Save JoshCheek/7c4fa63e81c5d73ec444 to your computer and use it in GitHub Desktop.
Students made this! <3
This file contains 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
# if this fails, you can get it with `gem install chunky_png` | |
require 'chunky_png' | |
bg_color = ChunkyPNG::Color.rgb 100, 50, 0 | |
line_color = ChunkyPNG::Color.rgb 150, 150, 200 | |
canvas = ChunkyPNG::Canvas.new 1200, 900, bg_color | |
i = 0 | |
while i < 100 | |
canvas.circle 600 , 450, 100 , line_color | |
canvas.line 500+i, 350+i, 500, 350, line_color | |
canvas.line 400+i, 450+i, 400, 450, line_color | |
i += 1 | |
end | |
canvas.save("pic.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment