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 27 - Green Strings

green-strings-9.png

A modification on yesterday’s sketch. Still trying to figure out what I can do with trigonometry without actually relearning trigonometry. I also totally cheated on today’s drawings, manipulating the sketch by commenting out various combinations of the shapes rather than coding in controls. Saving that for tomorrow!

Sketch:

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


Drawings:


Code:

function setup() {
  createCanvas(700, 700);
  fill(0);
}

function draw() {
  background(123, 156, 146);
  translate(width / 2, height / 2);

  var radius = width / 4;
  var angle = TAU / 100;

  r = random(0, 100);

  for (var i = 0; i <= r; i++) {
    var x = cos(angle * i) * radius;
    var y = sin(angle * i) * radius;

    line(100, 50, x, y);
    line(300, 300, x, y);
    line(-300, 50, x, y);
    line(-100, -300, x, y);

    noLoop();
  }
}

Chelsea Watson