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 69 - Root Vegetables

vegetables-1.png

It’s nice when skills I’ve learned are able to overlap - today’s one of those days. I was able to take the blobby trigonometry shapes I’ve been creating and loop the code to make multiples. It seems obvious now, but I hadn’t thought to do it before. I must be learning something! Truthfully, I preferred these cones when they were just black on a neutral background, but I thought a bit of colour might be nice, especially with how the stripes come out.

Sketch:

https://editor.p5js.org/chelseamwatson/present/q6KmWX-zf


Drawings:


Code:

xoff = 0;
i = 0;
y1 = 200;
x1= -300;
r=0;

function setup() {
  createCanvas(800, 800);
  background('#EEEDE9');
  noFill();
  r=random(50,100);
  strokeWeight(1.5);
}

function draw() {

  translate(width / 2, height / 2);
  
  if (x1<300) {
     
    let shades = ['#690600','#962100', '#D65700', '#CE9E4B','#A79564', '#868566', '#766F5F', '#5B7A84' ];
    let shade = random(shades);
    c = color(shade);
    stroke(c);
    
    xoff = xoff + 0.01;
    n = noise(xoff) * 2;

    var radius = r;
    var angle = TAU / r;
    var x = cos(angle * i) * radius;
    i = i + 0.1;

    ellipse(x1, y1, x,x/3);
    stroke(0,50);
    ellipse(x1-1,y1+1, x,x/3)
    y1 = y1 - 2;

    if (i >(r/4)) {
      r=random(50,100);
      x1=x1+(r*n);
      y1=random(180,220);
      i=n;
    }
  }
}

Chelsea Watson