Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Created July 26, 2019 03:21
Show Gist options
  • Save jamesmichiemo/d1cf10bd8abe5c8bb4b42b13cc9da4cf to your computer and use it in GitHub Desktop.
Save jamesmichiemo/d1cf10bd8abe5c8bb4b42b13cc9da4cf to your computer and use it in GitHub Desktop.
processing + propane sketch
#!/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