int counter;

void setup() {  //setup function called initially, only once
  size(250, 250);
  background(255);  //set background white
  colorMode(HSB);   //set colors to Hue, Saturation, Brightness mode
  counter = 0;
}

void draw() {  //draw function loops 
  counter++;
  noStroke();
  fill(random(255),100,255,50);
  
  if(mousePressed == true) { //add some interaction
    ellipse(mouseX, mouseY, 20, 20);
  }
  else {
    ellipse(width/2, height/2, 80*sin(counter), 80*sin(counter));
  }
}

                
                

code

tweaks (0)

about this sketch

This sketch is running in HTML5 using Processingjs.

This sketch is saved as a draft and it is not published on the homepage and browse page.

license

advertisement

Sinan Ascioglu prof+

test

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

You need to login/register to comment.