Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Circular Waves
- int x = 1;
- void setup()
- {
- size(800, 800);
- background(255, 255, 255);
- strokeWeight(10);
- }
- void draw()
- {
- if (mousePressed)
- {
- //Generates circles, with ascending diameters, where mouse click has happened
- background(255, 255, 255);
- //Each circle's diameter is 40 greater than the previous one
- ellipse(mouseX, mouseY, x, x);
- x = x + 40;
- } else {
- //Sets the initial diameter to 1, when mouse is released
- x =1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement