• fullscreen
  • PS3_04.pde
  • float x[] = new float[50];
    float y[] = new float[50]; 
     
    void setup() {
      size(250, 250);
      fill(170,175,175, 100);
      smooth();
      stroke(255);
    
      for (int i=0; i < x.length; i++) {
        x[i] = random(width);
        y[i] = random(height);
      }
    }
     
    void draw() {
      background(255);
     
      for (int i=0; i < x.length; i++) {
        float dia = dist(x[i], y[i], mouseX, mouseY);
        rect(x[i], y[i], dia, dia);
      }
    }
    void keyPressed() {
      saveFrame("PS3_04image.jpeg");
    }
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Kelly Truong

    Problem Set #3 - Question 04

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    Use arrays and loops to create an animated composition that evokes complexity.

    You need to login/register to comment.