Powered By Blogger

Monday 21 March 2011

Final Wallpaper Two

This wallpaper explores quads that look to be lines. With an image (below) that explores orange and yellow tones of colour, with hints of the red to reference the previous wallpaper.











Below is my final code for this wallpaper (noted are the changes made to the code from previous wallpaper):


import processing.pdf.*;




PImage img;
float cameraX,cameraY;

void setup(){
  size(500,1000,P2D);
  img = loadImage("http://999images.com/wallpapers/orange-leaf-dew-drops-1366x768.jpg"); //Different image being imported.


  beginRecord(PDF, "wallpaper_2.pdf"); 
  background(0);
   
}


void draw (){


  camera(-100, 50, random(-500,800), width, height, 1, 1, 1, 1);

  println(cos(cameraX));
    
  int x=floor(random(0,img.width));
  int y= floor(random(0,img.height));
    
  color myColor = img.get(x,y);
    
  noStroke(); //No outline because I wanted the quads to appear like rays and explore line in a softer way.
  fill(myColor,10); //I've made the transparency 10, in order to build up the sketch in the corner and fade it out to the edges.
  quad(y,x,random(10,20),random(20,30),random(10,20),random(20,30),random(10,20),random(20,30)); //Quad has been made to be drawn at random but in very restricted dimensions.
  smooth();
}
  
void keyPressed(){
  endRecord();
}

The result is as seen below:

No comments:

Post a Comment