Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Created July 25, 2019 18:00
Show Gist options
  • Save jamesmichiemo/ebeb0a4f779c708ce60623c377a3a177 to your computer and use it in GitHub Desktop.
Save jamesmichiemo/ebeb0a4f779c708ce60623c377a3a177 to your computer and use it in GitHub Desktop.
processing + propane sketch
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
# kinking the lines
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class KinkingLines < Propane::App
def settings
size 480, 120
end
def setup
sketch_title 'kinking the lines'
end
def draw
strokeWeight 2
$i = 20
$num = 400
while $i < $num do
line($i, 0, $i + $i/2, 80)
line($i + $i/2, 80, $i*1.2, 120)
$i +=20
end
end
end
KinkingLines.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment