• fullscreen
  • test1.pde
  • import processing.opengl.*;
    
    int pick;
    
    void setup() {
      size(800,800,JAVA2D);
      background(255);
      smooth();
    }
    
    void draw() {
      if(pmouseX != mouseX || pmouseY != mouseY) {
        stroke(color(random(0,255),random(0,255),random(0,255)));
        //fill(color(random(200,255)));
        pick = int(random(8));
        println(pick);
        if(pick == 0) {
          rect(mouseX, mouseY, random(4,16), random(4,16));
        } else {
          ellipse(mouseX, mouseY, random(16,48), random(16,48));
        }
      }
    }
    
    void keyPressed() {
      if (key == 'c') {
         background(255);
      }
    }
      
    

    code

    tweaks (0)

    about this sketch

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

    license

    advertisement

    Ben G

    Playing Around With Ellipse and Rect

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

    Just trying out a test.

    You need to login/register to comment.