• fullscreen
  • color_drawing_yoon1.pde
  • float angle = 0;
    float x = 40;
     
      
    void setup() {
     
      size(600, 600);
      smooth();
      background(255);
      frameRate(25);
      fill(random(50),random(45),random(193),120);
      strokeWeight(.3);
      
    }
     
     
    void draw() {
      translate(mouseX, mouseY);
      rotate(angle);
      ellipse(1,mouseY/3, x, x);
      angle += random(1);
      x-=1;
      if (x<0){
        x=50;
        }
        
        if (keyPressed == true) {
        background(255);
      }
    }
    
    
    
    void mouseDragged() {
      fill(random(255),random(255),random(255),175);
       triangle(mouseX+random(30),mouseY+random(30),random(40), random(40), random(40), random(40));
         fill(random(255),random(255),random(255),175);
      triangle(mouseX+random(30),mouseY+random(30),random(40), random(40), random(40), random(40));
      stroke(random(10,50),random(10,50),random(10,50),130);
      line(mouseX,mouseY+20,mouseX+50,mouseY+50);
    
       frameRate(150);
       
       
       if (mouseX>350 && mouseY> 350){
       frameRate(1500);
        strokeWeight(40);}
       else {
         strokeWeight(0.5);}
    
    }
     
    

    code

    tweaks (0)

    about this sketch

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

    license

    advertisement

    Yoon Hur

    Colored-shape Drawing

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

    Move mouse while clicked or without a click.

    When mouse is clicked and moved - Triangles and circles with random colors.
    Size of triangles and circles is getting increased from the left to the right and from the top to the bottom.

    When mouse is clicked and moved into the right bottom - Random-sized triangles and circles with random colors AND HEAVY STROKES.

    When mouse is released and moved - Only random-sized circles with a last color when the mouse was released. The distance of circles from the mouse is getting increased from top to bottom.

    When any key is pressed - Clean

    You need to login/register to comment.