Artwork

https://youtu.be/3kV6MmwO86A?t=87

Scene

Screen Shot 2021-11-20 at 1.53.28 PM.png

Code

void setup() {
  size(640, 360);
  noFill();
  background(0);
  
  filter(BLUR, 3);
  strokeWeight(12);
  stroke(160);
}

void draw() {
  if (mousePressed == true) {

    // Inner Pentagon w/ BLUR (name = 1)
    filter(BLUR, 3);
    pushMatrix();

    translate(width-width/4, height/2);
    rotate(30); 
    
    float circleResolution1 = int(map(mouseY + 100, 0, height, 5, 5));
    float radius1 = mouseX - width / 2;
    float angle1 = TAU / circleResolution1;

    beginShape();
    
    for (int i = 0; i <= circleResolution1; i++) {
      float x = cos(angle1 * i) * radius1;
      float y = sin(angle1 * i) * radius1;
      vertex(x, y);
    }
    
    endShape();

    popMatrix();
    
    // Inner Pentagon w.o/ BLUR (name = 2)
    pushMatrix();

    translate(width-width/4, height/2);
    rotate(30); 
    
    float circleResolution2 = int(map(mouseY + 100, 0, height, 5, 5));
    float radius2 = mouseX - width / 2;
    float angle2 = TAU / circleResolution2;

    beginShape();
    
    for (int i = 0; i <= circleResolution2; i++) {
      float x = cos(angle2 * i) * radius2;
      float y = sin(angle2 * i) * radius2;
      vertex(x, y);
    }
    
    endShape();

    popMatrix();
    
    // ------------------------------------------------------- 
    
    // Outer Pentagon w/ BLUR (name = 3)
    filter(BLUR, 3);
    pushMatrix();

    translate(width-width/4, height/2);
    rotate(140); 
    
    float circleResolution3 = int(map(mouseY + 100, 0, height, 5, 5));
    float radius3 = (mouseX - width / 6)*3;
    float angle3 = TAU / circleResolution3;

    beginShape();
    
    for (int i = 0; i <= circleResolution3; i++) {
      float x = cos(angle3 * i) * radius3;
      float y = sin(angle3 * i) * radius3;
      vertex(x, y);
    }
    
    endShape();

    popMatrix();
    
    // Outer Pentagon w.o/ BLUR (name = 4)
    pushMatrix();

    translate(width-width/4, height/2);
    rotate(140); 
    
    float circleResolution4 = int(map(mouseY + 100, 0, height, 5, 5));
    float radius4 = (mouseX - width / 6)*2;
    float angle4 = TAU / circleResolution4;

    beginShape();
    
    for (int i = 0; i <= circleResolution4; i++) {
      float x = cos(angle4 * i) * radius4;
      float y = sin(angle4 * i) * radius4;
      vertex(x, y);
    }
    
    endShape();

    popMatrix();
    
  }
}

Screen Shot 2021-11-20 at 1.52.53 PM.png