Skip to content

Instantly share code, notes, and snippets.

View macmv's full-sized avatar

Neil Macneale V macmv

View GitHub Profile
@macmv
macmv / circle.rb
Created November 21, 2015 16:57
Simple circle image generator for Ruby/Gosu
#! /usr/local/bin/ruby
require 'gosu'
class Circle
attr_reader :columns, :rows
def initialize(radius, colorR, colorG, colorB)
@columns = @rows = radius * 2
lower_half = (0...radius).map do |y|