Created
July 27, 2019 14:49
-
-
Save jamesmichiemo/cabc4c4194d8ce1b2d193816e35b8341 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' | |
# pins and lines | |
# propane graffiti by 8mana | |
# based on code by Casey Reas and Ben Fry | |
class PinsLines < Propane::App | |
def settings | |
size 480, 120 | |
end | |
def setup | |
sketch_title 'pins and lines' | |
end | |
def draw | |
background 0 | |
fill 255 | |
stroke 102 | |
$y = 20 | |
while $y <= height-20 do | |
$x = 20 | |
while $x <= width-20 do | |
ellipse $x, $y, 4, 4 | |
# draw a line to the center of the display | |
line $x, $y, 240, 60 | |
$x += 10 | |
end | |
$y += 10 | |
end | |
end | |
end | |
PinsLines.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment