Slide 1

Slide 1 text

Printing Code Programming and the Visual Arts @runemadsen

Slide 2

Slide 2 text

Rune Madsen.

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Week 1: Form Week 2: Color Week 3: Typography Week 4: Grid Systems Week 5: Logo Week 6: Randomization Week 7: Repetition Week 8: Transformation Week 9: Motion Week 10: 3D www.runemadsen.com/printing-code

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

"Processing seeks to ruin the careers of talented designers by tempting them away from their usual tools and into the world of programming and computation. Similarly, the project is designed to turn engineers and computer scientists to less gainful employment as artists and designers"

Slide 9

Slide 9 text

Graphic Design vs. Code

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

# Create a new bare Git repository. # # name - The String name of the repository. # hooks[] - The String array of hooks to enable when creating the repo # # Returns a JSON string of the created repo post '/repos' do repo_name = params[:name] repo_name += ".git" unless repo_name =~ /\.git/ repo = Grit::Repo.init_bare(File.join(settings.git_path, repo_name)) enable_hooks(File.join(settings.git_path, repo_name), params[:hooks]) if params[:hooks] repo_to_hash(repo).to_json end

Slide 13

Slide 13 text

“It's important to use your hands, this is what distinguishes you from a cow or a computer operator” Paul Rand, Conversations with Students, 1995

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Graphic Design History

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

William Addison Dwiggins

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

Graphic Design + Code

Slide 28

Slide 28 text

Form

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

void setup() { size(600, 850); translate(width/2, 125); fill(30); int[] points = {3, 4, 6, 40}; for(int i = 0; i < points.length; i++) { beginShape(); for(int j = 0; j < points[i]; j++) { float vertexX = cos(radians(j * (360/points[i]))) * 100; float vertexY = sin(radians(j * (360/points[i]))) * 100; vertex(vertexX, vertexY); } endShape(); translate(0, 200); } }

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

Paul Rand My Version

Slide 33

Slide 33 text

void setup() { size(800, 1048); background(255); smooth(); PFont helvetica = createFont("Helvetica-BoldItalic", 50); translate(100, 100); int count = 0; for(int x = 0; x < 5; x++) { for(int y = 0; y < 7; y++) { if(count == 27) drawText(x * 148, y * 141, 100, #138b29, helvetica); else if(count == 17) drawHeart(x * 148, y * 141, 100, #FF0000); else drawHeart(x * 148, y * 141, 100, #138b29); count++; } } }

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Paul Rand My Version

Slide 36

Slide 36 text

void setup() { size(800, 1013); background(0); int[] colors = { #33238e, #2042a4, #e77a27, #2c4b21, #cc4e73}; PFont helveticabold = createFont("Helvetica-Bold", 25); PFont helvetica = createFont("Helvetica-UltraLight", 21); float s = 70; float textX = 150; float textY = 300; drawText(textX, textY, helveticabold, helvetica); for(int i = 0; i < 30; i++) { float x = random(s, width-s); float y = random(s, height-s); if( x < textX-(s*1.3) || x > textX+350 || y < textY-(s*1.3) || y > textY+130) { int c = colors[int(random(colors.length))]; fill(c); ellipse(x, y, shapeSize, shapeSize); } } }

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

1 2

Slide 39

Slide 39 text

void setup() { drawTriangle(0, 0, startSize, 0, 0, false, #003c82); } void drawTriangle(float x,float y,float s,float r,int l,boolean split,int c) { float b = d / 2; float c = d / factor; float a = sqrt(sq(c) - sq(b)); translate(x, y); rotate(radians(r)); fill(c); triangle(0, 0, -b, a, b, a); level++; if(!split && l < maxLevel) drawTriangle(0, 0, s, 0, level, false, #003c82); else if(l < maxLevel) { drawTriangle(-(a / sqrt(3)), a, c, 150, level, false, #003c82); drawTriangle(a / sqrt(3), a, c, -150, level, false, #003c82); // ... drawTriangle(0, a - childA, childBottom, 0, level, true, #50c8fa); drawTriangle(0, a - childA, childBottom, 120, level, true, #50c8fa); drawTriangle(0, a - childA, childBottom, -120, level, true, #50c8fa); } }

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Color

Slide 43

Slide 43 text

Complementary Analogous Triadic Tetradic

Slide 44

Slide 44 text

10° 30° 50° 70°

Slide 45

Slide 45 text

10° 51° 192° 231°

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

void setup() { size(600, 800); colorMode(HSB, 360, 100, 100); noStroke(); for(int i = 0; i < 3; i++) { fill(i * 20, 80, 90); rect(0, i * (height/3), width, height/3); } }

Slide 48

Slide 48 text

void setup() { size(600, 800); colorMode(HSB, 360, 100, 100); noStroke(); float hueStart = random(0, 120); float multiplier = random(10, 40); float s = random(70, 100); float b = random(40, 100); for(int i = 0; i < 3; i++) { float h = hueStart + (i * multiplier); fill(h, s, b); rect(0, i * (height/3), width, height/3); } }

Slide 49

Slide 49 text

import toxi.color.*; import toxi.color.theory.*; import toxi.util.datatypes.*; void setup() { colorMode(HSB, 1, 1, 1); TColor col = TColor.newHSV(0.038888, 0.84, 0.94); ColorTheoryStrategy s = new TetradTheoryStrategy(); ColorList colors = ColorList.createUsingStrategy(s, col); translate(width / 2, height / 2); float phi = (1+sqrt(5.0))/2.0; float increment = 2*PI*phi + (2*PI); for (int i = 1; i < 300; i++) { float distance = sqrt(i)*15; float angle = i * increment; float cx = distance*cos(angle); float cy = distance*sin(angle); TColor curColor = colors.get(int(random(colors.size()))); fill(curColor.hue(), curColor.saturation(), curColor.brightness()); ellipse(cx, cy, 20, 20); } }

Slide 50

Slide 50 text

// draw one triangle FloatRange h = new FloatRange(0.1, 0.8); FloatRange s = new FloatRange(0.3, 0.8); FloatRange b = new FloatRange(0.75, 1); ColorRange range = new ColorRange(h, s, b, "quarter one"); for(int i = 0; i < 5; i++){ TColor ranColor = range.getColor(); canvas.fill(ranColor.hue(), ranColor.saturation(), ranColor.brightness()); canvas.vertex(x1[i], y1[i]); }

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

Grid Systems

Slide 53

Slide 53 text

* www.ilovetypography.com

Slide 54

Slide 54 text

* www.ilovetypography.com

Slide 55

Slide 55 text

class Column { int x, y, w, h; Column(int _x, int _y, int _w, int _h) { //... setters } } void setup() { Column col = new Column(50, 50, width-100, height-100); for(int i = 0; i < 100; i++) { float x = random(col.x, col.x + col.w - ellipseSize); float y = random(col.y, col.y + col.h - ellipseSize); ellipse(x, y, ellipseSize, ellipseSize); } }

Slide 56

Slide 56 text

class Grid { int cols; float pageMargin; Column[] columns; Grid(int _cols, float _pageMargin) { //... create columns } } void setup() { Grid grid = new Grid(3, 50); for(int i = 0; i < grid.columns.length; i++) { for(int j = 0; j < 40; j++) { Column col = grid.columns[i]; float x = random(col.x, col.x + col.w - ellipseSize); float y = random(col.y, col.y + col.h - ellipseSize); ellipse(x, y, ellipseSize, ellipseSize); } } }

Slide 57

Slide 57 text

class ModularGrid { int cols, rows; float gutterSize, pageMargin; Module[][] modules; ModularGrid(int _cols, int _rows, float _gutterSize, float _pageMargin) { //... create modules } } void setup() { ModularGrid grid = new ModularGrid(3, 4, 10, 50); for(int i = 0; i < grid.modules.length; i++) { for(int j = 0; j < grid.modules[i].length; j++) { for(int k = 0; k < 10; k++) { Module mod = grid.modules[i][j]; float x = random(mod.x, mod.x + mod.w - ellipseSize); float y = random(mod.y, mod.y + mod.h - ellipseSize); ellipse(x, y, 40, 40); } } } }

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

Original Matt Epler Matt Epler

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

More r a p t y p g y a

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

Automated Design

Slide 67

Slide 67 text

require 'rubygems' require 'bundler' Bundler.require set :root, File.dirname(__FILE__) class Processing class << self def run(sketchname) Headless.ly do r = File.dirname(__FILE__) `#{r}/bin/processing/processing-java --sketch=#{r}/sketches/#{sketchname} --output=#{r}/sketches/#{sketchname}/build --force --run` end end end end get '/' do # this should totally go in a background job. # Just showing it here for simplicity Processing.run("test") "Generated a test image into /sketches/test. You can upload it to S3 or whateva." end

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

“We think of great design as art, not science, a mysterious gift from the gods, not something that results just from diligent and informed study. But if every designer understood more about the mathematics of attraction, the mechanics of affection, all design [...] could both look good and be good for you” Lance Hosey, The New York Times

Slide 71

Slide 71 text

Thank You. @runemadsen bit.ly/printingcode