Created
July 12, 2019 23:53
-
-
Save jamesmichiemo/11f0b24b5c9a11ccb6ee3d6ee62789a9 to your computer and use it in GitHub Desktop.
processing + propane sketches
This file contains hidden or 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' | |
| # create some creatures | |
| # propane graffiti by 8mana | |
| # based on code by Casey Reas and Ben Fry | |
| class CreateCreatures < Propane::App | |
| def settings | |
| size 480, 120 | |
| end | |
| def setup | |
| sketch_title 'create some creatures' | |
| end | |
| def draw | |
| # left creature | |
| fill 255 | |
| beginShape() | |
| vertex 50, 120 | |
| vertex 100, 90 | |
| vertex 80, 20 | |
| vertex 210, 60 | |
| vertex 160, 80 | |
| vertex 200, 90 | |
| vertex 140, 100 | |
| vertex 130, 120 | |
| endShape | |
| fill 0 | |
| ellipse 155, 60, 8, 8 | |
| # right creature | |
| fill 255 | |
| beginShape() | |
| vertex 370, 120 | |
| vertex 360, 90 | |
| vertex 290, 80 | |
| vertex 340, 70 | |
| vertex 280, 50 | |
| vertex 420, 10 | |
| vertex 390, 50 | |
| vertex 410, 90 | |
| vertex 460, 120 | |
| endShape() | |
| fill 0 | |
| ellipse 345, 50, 10, 10 | |
| end | |
| end | |
| CreateCreatures.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment