• fullscreen
  • sunset_tile.pde
  • PImage sunset; // PImage stores images
    int xpos = 0;
    
    void setup(){
      size(500,335);
      background(0);
      sunset = loadImage("sunset.jpg");
    }
    
    
    void draw(){
      //image(sunset,0,0); // draw the image
      int xp = int(random(width));
      int yp = int(random(height));
      color c = sunset.get(xp,yp);// get colour at xpos,ypos
      fill(c,50); // fill with that colour
      noStroke();
      rect(xp,yp,random(10,50),random(10,50));
    }
    

    code

    tweaks (0)

    about this sketch

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

    license

    advertisement

    mitchell whitelaw

    Sunset Tile

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

    A simple image demo

    You need to login/register to comment.