Created
July 26, 2019 03:21
-
-
Save jamesmichiemo/d1cf10bd8abe5c8bb4b42b13cc9da4cf to your computer and use it in GitHub Desktop.
processing + propane sketch
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
#!/usr/bin/env jruby | |
# frozen_string_literal: false | |
require 'propane' | |
# embed one loop in another | |
# propane graffiti by 8mana | |
# based on code by Casey Reas and Ben Fry | |
class EmbedLoop < Propane::App | |
def settings | |
size 480, 120 | |
end | |
def setup | |
sketch_title 'embed one loop in another' | |
end | |
def draw | |
background 0 | |
$y = 0 | |
while $y <= height do | |
$x = 0 | |
while $x <= width do | |
fill 255, 140 | |
ellipse $x, $y, 40, 40 | |
$x +=40 | |
end | |
$y +=40 | |
end | |
end | |
end | |
EmbedLoop.new | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment