loading
Hey guys, this is my first instructable, and sorry its more of a "Hey, look what I made, why don't you make one too!" sorta thing.

I spent some time yesterday making a little processing sketch yesterday that would split an image you gave it into 6 binary grey-scale images which it would neatly arrange in a grid. The individual images are flipped such that when folded the layers line up and produce a cool looking grey-scale image. The picture is improved by soaking the paper in oil, and having it lit from behind. I haven't tried it but if you have thinner paper that your printer can print on, that might work a bit better.

Yeah, so this thing is not very similar to a lithophane (http://en.wikipedia.org/wiki/Lithophane) but I like the idea of an image that looks different when light is shone through it. Another idea to make it slightly more lithophane-like is to use a laser cutter to cut holes in the paper to have genuine different layer thicknesses.
Also check this instructable out as a bit of my inspiration came from here: https://www.instructables.com/id/How-to-Make-a-Paper-Lithophane/

So here's the processing sketch, copy it and paste it into your processing window:

/* Designed by Faraz Sayed initially on 28/05/13
This sketch will take an image and split it into several layers
in a way that it can be printed on an paper, cut and folded to
form a paper lithophane.
Twitter nanoBorg88
*/
//INSTRUCTIONS
//press any key to save image produced into project folder
//when printed cut around all printed area and the red lines
//fold along black lines alternating folds between mountain and valley
// unfold and cover in a clear oil to make more transparent


String fileNm = "image.jpg"; //replace with the name of file,
//needs to be a square image to retain aspect ratio
int lowLim= 35; //number between 0 and 255 to start threshold
int upLim= 200;//number between 0 and 255 to end threshold

//You shouldn't have to change anthing below here
int thresh; //initialise variable to determine threshold of each layer
int onePartHW = 200; // the width and height of the once folded size
PImage img;
PImage sImg = createImage(onePartHW, onePartHW, RGB);
int n = int(random(99));
void setup() {
  size(2*onePartHW, 3*onePartHW);
  img = loadImage(fileNm); // image loaded
  image(img, 0, 0, onePartHW, onePartHW); //image printed on first corner
  sImg = get(0, 0, onePartHW, onePartHW);
  noLoop();
}


void draw() {
  //layer(75, sImg);
  allSix(lowLim, upLim, sImg);
  guideLines();
}

void layer(int t, PImage img) {
  // borrowed and adapted this section below from processing website
  PImage bW = createImage(onePartHW, onePartHW, RGB);
  //bW.loadPixels();
  for (int x = 0; x < onePartHW; x++) {
    for (int y = 0; y < onePartHW; y++ ) {
      int loc = x + y*onePartHW;
      // Test the brightness against the threshold
      if (brightness(img.pixels[loc]) > t) {
        bW.pixels[loc]  = color(255);  // White
      } 
      else {
        bW.pixels[loc]  = color(225);    // light grey
      }
    }
  }
  image(bW, 0, 0);
}

void allSix(int st, int nd, PImage img) { // st=start threshold nd=end threshold
  int inc = int((nd-st)/6);
  layer(st, img);
  pushMatrix();

  scale(-1, 1);
  translate(-2*onePartHW, 0);
  layer(st+inc, img);//second pic

  scale(1, -1);
  translate(0, -2*onePartHW);
  layer(st+2*inc, img);//third pic

  scale(-1, 1);
  translate(-2*onePartHW, 0);
  layer(st+3*inc, img);//forth pic

  scale(1, -1);
  layer(st+4*inc, img);//fifth pic

  scale(-1, 1);
  translate(-2*onePartHW, 0);
  layer(st+5*inc, img);//sixth pic

  popMatrix();
}

void guideLines() {
  stroke(50);
  line(onePartHW,0,onePartHW,3*onePartHW);
  line(onePartHW,onePartHW,2*onePartHW,onePartHW);
  line(0,2*onePartHW,onePartHW,2*onePartHW);
  stroke(200,0,0);
  line(0,onePartHW,onePartHW,onePartHW);
  line(onePartHW,2*onePartHW,2*onePartHW,2*onePartHW);
  stroke(200);
  noFill();
  rect(0,0,2*onePartHW,3*onePartHW);
}
void keyPressed() {
  save("image"+ n +".png");
  n++;
}
//end of processing sketch




Copy an image into the sketch folder and name it image.jpg. Edit the picture and make sure its cropped to a square shape, any other shape would make the sketch mess up the aspect ratio of your picture.
Run the sketch, and see whether you have a good set of pictures. If not close the sketch and adjust the values of lowLim such that the first image has 10-20% filled and upLim such that last image has 80-90% filled(values range from 0-255) .
When you like the look of the image produced, press any key to save the result in your sketch folder. 

Print out the image the full page of A4 to end with a classic Polaroid sized picture. Once printed cut all the way around it and also along the red lines, it may also be wise to score along the grey lines separating the pictures for easy folding.
Fold the paper up in a sort of concertina alternating valley and mountain folds. You can take a sneak peak at the picture now, but I would do the next step just cause I like the look of it.

Open out your picture and get a shallow plastic tray (anything that would stop you getting oil everywhere). Take your oil and smother the paper in it. It will become more transparent , spread it equally such that all of it has more or less the same opacity. I like to put excess and fold it up again, leave it to sit for a while then wipe of the excess.

I think your done, fold it back up, and hold it up to the light and admire your new pic! could also find a nice window to stick it on

Tell me how you get on, and if you make one I'd love to see it in the comments below.

If you have any tips on how I could improve my instructables in the future feel free to tell me about it.






Is that Sugarman?
Lol, no it's picture of me. I had a quick search and I guess you could say I look a little like him.
Haha yeah that picture looks like a close up of one of his album covers :)
Where is your program being run, or how is it compiled?
Processing is a graphical programming language and environment, and can be downloaded from http://processing.org/download/
A very interesting tool. I had not heard of it before. Thanks!

About This Instructable

665views

4favorites

License:

Bio: I like to make things that I don't think have been made before. I like to try and make things that use or reuse ... More »
More by nanoBorg88:Simple Automatic Door Closer The WedgeCam- A Camera Obscura for your scanner Parallel Lasers Using Line Level 
Add instructable to: