Alex Ten Liner

Screen Shot 2014-10-01 at 5.07.59 PM

For this project, I wanted 10 lines to vibrate around the courser. Several challenges that arose were trying to figure out how to make diagonal lines starting at the bottom left and moving to the top right. I still have not figured out how to make the random variable move on the inverted axis. Therefore, unlike thee other lines that run diagonal from top left to bottom right, horizontal and vertical, the diagonal lines that run from bottom left top top right do not vibrate into each other.

void setup() {
  size(400,400);
  frameRate(10);
}

void draw(){
  background(0);
  
  float dx=random (-10, 10);
  float dy=random (-12, 12);
  float da=random (-15,15);
  float db=random (-17,17);
  float dc=random (-20,20);
  strokeWeight(3);
  
  //diagonal L to R down
  stroke(50);
  line(0,0, (mouseX-6)+dx,(mouseY-6)+dx);
  stroke(150);
  line((mouseX+6)+db,(mouseY+6)+db, width,height);
  
  //horizontal
  stroke(75);
  line(0,height/2, (mouseX-10)+da,(mouseY));
  stroke(175);
  line((mouseX+10)+dc,(mouseY), width,height/2);
  
  //vertical
  stroke(255);
  line(width/2,0, (mouseX),(mouseY-10)+dy);
  stroke(125);
  line((mouseX),(mouseY+10)+dc, width/2,height);
  
  //diagonal L to R up top
  stroke(50);
  line(0,350, (mouseX-8)+db,(mouseY+5)+db);
  stroke(225);
  line((mouseX+5)+dy,(mouseY-8)+dy, 350,0);
  
  //diagonal L to R up btm
  stroke(100);
  line(50,height, (mouseX-5)+dc,(mouseY+8)+dc);
  stroke(200);
  line((mouseX+8)+da,(mouseY-5)+da, width,50);
}

Comments are closed.