MinaCoding2024_ManyLines

MinaCoding2024_ManyLines

Lines Can Be Interesting

LinedWorking

For the 5th day of #MinaCoding2024 : "Many Lines" ,LinedWorking is coded in P5JS shows numerous lines layered in a 3D perspective while they are working.

Poetry

Intersection of Lines
Their Transformation intertwines
Translating
Rotating
Elevating
Spectating

Video

P5JS Code

function setup() {
  createCanvas(800, 800);
}

function draw() {

//Line Color Scheme with StrokeWeight
  frameRate(45)
  background((second() % 20) * 12);
  for (i = 0; i < 800; i++) {
    if(i % 5 == 0)
{
  stroke("purple")
  strokeWeight(second() % 6 + 1)
}    
    else if (i % 3 == 0) {
      stroke("blue");
      strokeWeight(Math.cbrt(second()/ i))
    } else if (i % 2 == 0) {
      stroke("teal");
    } else {
      stroke("gold");
    }
//Lines
    line(i, i / 2 + second() % 12, (i * second()  %12), i / 3);
    line(i / 2, Math.cbrt(i * second() % 30) * 12, i / 3, i);

    line(i / 2, i / 3, i, Math.hypot(i, (second() % 30)/8));
    line(i + random(-2,2), i, i / 3, i / 2 * (random(-3,3)));
  }
}