100x100 Computational Design Challenge

Throughout 2020 I created 100 computational designs in 100 days as a way to learn creative coding and explore generative art

Day 42 - Log Cabin

log-cabin-2.png

This week I’m drawing inspiration from the incredible textiles of Gee’s Bend Quiltmakers. Today’s quilt is a beautiful log cabin style quilt by Linda Pettway.

In 1972 a sewing cooperative near Gee's Bend secured a contract with Sears, Roebuck to make corduroy pillowcases. This left little room for personal creativity, but the availability of corduroy stimulated a profound creative response. Leftover lengths and scraps of corduroy were taken home by workers and were transformed from standardized remnants into vibrant and individualized works of art, such as the one below.

I used strips of colour rather than squares like Linda would have to make this sketch, varying the colours ever so slightly in an attempt to capture the warmth of her work. I also couldn’t decide on my favourite size so added in the ability to play with the sizes of the strips.

Sketch:

https://editor.p5js.org/chelseamwatson/present/q6XQijcAJ

  • Keys 1-4: changes the size of the squares

“Log Cabin — Single-Block Variation, Tied With Yarn” by Linda Pettway, 1975

“Log Cabin — Single-Block Variation, Tied With Yarn” by Linda Pettway, 1975


Pseudocode:

  • Place a pink rectangle in the middle of the canvas

  • Ensure there is still a border around the rectangle, that it doesn’t extend all the way to the edge

  • Draw horizontal yellow strips on top of the rectangle, starting at the top of the canvas

  • The first yellow strip should be the length of the canvas

  • Each strip after should be as long as the previous, minus the strip height

  • Draw blue dots in a grid patterns overtop of the rectangle and the strips

  • The dots should be spaced vertically and horizontally based on the yellow strip height

  • Vary all of the colours ever so slightly


Drawings:


Code:

h = 50;
w = 800;
x1 = 0;
y1 = 0;
x2 = h;
y2 = 0
x3 = 0;
y3 = 0;

function setup() {
  createCanvas(800, 800);
  background(240, 236, 233);
  noStroke();
}

function draw() {

  r = random(215, 225)

  fill(r, 164, 5);
  rect(x1, y1, w, h);
  y1 = y1 + h
  x1 = x1 + h
  w = w - h

  fill(r, 180, 161);
  rect(x3 + (h * 5), y3 + (h * 5), w + width, h);
  if (x3 < (h * 5)) {
    y3 = (y3 + h)
  }
  if (y3 > height - (h * 10)) {
    x3 = 0;
    y3 = 1000;
  }

  fill(145, r, 220);
  ellipse(x2, y2 + h, 4, 4);
  x2 = x2 + h


  if (x2 > (width - h)) {
    x2 = h;
    y2 = y2 + h;

    if (y2 >= (height - h)) {
      y2 = 0 + h;
      x2 = h;
    }
  }

}

function keyReleased() {
  if (key == '1') h = 50;
  w = 800;
  x1 = 0;
  y1 = 0;
  x2 = h;
  y2 = 0;
  x3 = 0;
  y3 = 0;
  background(240, 236, 233);
  if (key == '2') h = 40;
  w = 800;
  x1 = 0;
  y1 = 0;
  x2 = h;
  y2 = 0;
  x3 = 0;
  y3 = 0;
  background(240, 236, 233);
  if (key == '3') h = 20;
  w = 800;
  x1 = 0;
  y1 = 0;
  x2 = h;
  y2 = 0;
  x3 = 0;
  y3 = 0;
  background(240, 236, 233);
  if (key == '4') h = 10;
  w = 800;
  x1 = 0;
  y1 = 0;
  x2 = h;
  y2 = 0;
  x3 = 0;
  y3 = 0;
  background(240, 236, 233);
}

Chelsea Watson