yet another kinda art [week 3]

This time around I was feeling very inspired to improve on my previous week’s forest animation work. Although it did work, it didn’t work as it was intended with a background. Only after the class, I realized that I should have added for class and put all the curve inside the for loop and give a variable that would constantly instantiate on itself.

Laser show animation inspired by Art NOW. It’s mesmerizing to look at a laser show, just like fire you could stare at it endlessly. I tried to recreate the laser show by using multiple rectangles that will rotate from the center and clash between each other from different angles that would give the abstract laser-like feel.

This time, however, I tried to implement waves using sin as it reminds me of soundwaves, rotating them and doing it for rectangles would have created a unique look.

The difficulty was in aligning to the center, from the very first tries it would only be rotating over the top left corner until I remembered about the translate function to place all the rotations to happen right in the center of the screen.

Randomizing the angle for the rotate function creates a new pattern each and every time and that’s the beauty of generative art. strokeWeight(map(laser, -1, 1, 0.5,weight )); makes the lines fade out and look smooth. By putting mouseX now it is also interactive to speed up and have control over the rotating rectangles. The only backlash is it’s really difficult to control speed, I specifically don’t get why is it fast in the beginning.

float angles= random(0.1,30);// to randomize angles
float colorstroke=random(0,255); //to randomize colors
float weight=random(0.25,3); //fadeaway effect

void setup() {
  size(940,680);
  smooth();
  
}

void draw() {
  background(0);
  
  center(); //shifts 0,0 coordinates to the center
  
  float laser= sin(radians(frameCount));
  float l= laser*map(mouseX,0,height,2000,0); //rectangle waves
  
  for (int i=0; i<300; i++){
    rotate(angles);
    noFill();
    stroke(255);
    strokeWeight(map(laser, -1, 1, 0.5,weight ));
    rect(550,i+l,-550, i++ );
    
    noFill();
    stroke(colorstroke,0,colorstroke);
    strokeWeight(map(laser, -1, 1, 0.5,weight ));
    rect(550,i-l,-550, i++ );
    
    noFill();
    stroke(0,colorstroke,colorstroke);
    strokeWeight(map(laser, -1, 1, 0.5,weight ));
    rect(550,i-l/2,-550, i++ );
  }
}

void center(){
  translate(width/2,height/2);
}

 

One thought on “yet another kinda art [week 3]”

  1. Great work on this Zharmakhan. The assignment was to use OOP and make one or more classes you use in your code though. Let me know if how to do that is unclear and we can over it again.

Leave a Reply