Created
July 29, 2019 17:53
-
-
Save jamesmichiemo/3e6399e46962e05660bffa8c94ed0660 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' | |
# halftone dots | |
# propane graffiti by 8mana | |
# based on code by Casey Reas and Ben Fry | |
class HalftoneDots < Propane::App | |
def settings | |
size 480, 120 | |
end | |
def setup | |
sketch_title 'halftone dots' | |
end | |
def draw | |
background 0 | |
$y = 32 | |
while $y <= height do | |
$x = 12 | |
while $x <= width do | |
ellipse $x + $y, $y, 16 - $y/10.0, 16 - $y/10.0 | |
$x += 15 | |
end | |
$y += 8 | |
end | |
end | |
end | |
HalftoneDots.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment