You are on page 1of 10


Food Living Outside Play Technology Workshop
How to make folded book art easier using your computer
by Moini on February 11, 2014
Intro: How to make folded book art easier using your computer
In various places, I saw those beautiful folded book art pieces (like in these instructables: Book-Art-How-to-Fold-a-Book-into-a-Word , Folded-Book-Art-Best-most-
clear-Tutorial-available ) - and as I am an avid reader and love books, paper and art, this was a wonderfully alluring combination!
So, I absolutely wanted to make my own! And of course I also wanted to use my own pattern, not just anything!
Looking into one of the instructables (How-to-Fold-a-Book-into-a-Word-The-original-tuto ), which describes the process of making your own pattern, I saw that the
measuring and mapping from picture to page is a really tedious, time-consuming process , which can also go wrong in many places. And I realized that the number of
free ready-to-fold patterns is a bit, .... mmmh, limited - you don't always want hearts...unless it's Valentine's day, of course.
As I'm also learning how to program, and am a fan of open source software, I thought I could combine this with the books to create something useful.
So I wrote a program which can turn your picture into a pattern for making book folding art.
This instructable is not about how to write that program, nor will I explain in detail how it works.
This instructable shows you how to use the program to make your own book art with your own pattern .
WARNING : The program was only tested on Linux . I do not know, nor can I test, if it also runs on a Windows or Mac OS operating system. If you find out if / how it
works on those other, non-open source operating systems, please provide a hint in the comments for other users!
Update : Instructables user flogy4031 and I got it to work on Windows 7 . flogy installed WAMP (from, a server environment for Windows, which did some
of the configuration of php for him, and imagemagick . Then flogy still had to do some configuration to make the command line work (see linked videos in the comment
section). I have now added a Windows version of the script to the github repository, which eliminates a problem caused by different behaviour of the Windows
command line.
Thank you very much, flogy4031!
Update 2 : As the configuration of php and imagemagick seems quite difficult on Windows for the non-geeks, I added the option to use a virtual machine (which is a
little computer inside you computer, if you will). I think this is much easier for the Windows users, and it will also work on Mac OS/X. However, the download size is
bigger. Go straight to option 2, if you prefer this!
Step 1:Preparations - Get the software
OPTION 1: Install php, imagemagick and the script (suggested for Linux users and experienced Windows users)
My script is written in PHP . This is because I am learning PHP - which is usually more widely used for programming web sites.
So you will need to install PHP in order to run it on your computer - not just any PHP, but the Command Line Interface version for your operating system, because my
script runs in the terminal (this way, it can interactively ask questions).
For my system (Linux Mint ), the package I had to install is called "php5-cli ". The name of the package will be similar for all Linux distributions. For Windows systems,
the program is available from here , but you will have to find out on your own how to install and use it, because I cannot try this out. I guess you might also need a
terminal, also called shell or console, for your Windows installation to be able to call the script. For Mac OS/X look for help on .
A decent file manager (for example Krusader ) and some picture editing software (like Gimp and/or Inkscape ) will also be useful - not only for this project ;-).
As the script also uses image manipulating software to resize a picture, you will also need that image manipulating software, which is called "imagemagick ". That's
also the name of the package you will need to install on Linux distributions. On the software installation files for Windows and Mac OS/X are also
My script
After all, you will also need the script. I don't claim that it is a masterpiece of software, but it works as intended.
You can find it on github in my repository .
You can either download and unpack the whole repository, or only copy and paste this php script (Linux version) or this php script (Windows version) into a text file on
your computer (I mean a real textfile generated with any editor, not with your OfficeSuite). If you copy-paste, you need to name the file. Call it 'BookArtGenerator.php'.
You can now look into the script to see what it does if you like. It's well commented. You can also change and improve things if you like. You can make your own versions
of the script - it's free and open source software! You may even sell it - or products made with it, as long as you publish the source code for your modified script.
OPTION 2: Install virtualbox and 7zip, import Virtual Machine (suggested for the less experienced Windows users)
Above, you can see a screenshot of the Virtual Machine I prepared for you.
Download the software VirtualBox from . This software will allow you to simulate another computer with another operating system on your computer. It's
easy to use, ready for even professional use and a very, very useful thing. It is also cost-free and open source.
7zip is a software which is used to compress / uncompress files. You can download it from . It is also cost-free and open source and works very well. I used it to
pack my Virtual Machine, so the download is only one file, which is a bit smaller than the original files.
The BookArtVM
I prepared a special treat for you: A virtual machine (which is some kind of 'simulated computer'), which contains everything necessary to use the BookArtGenerator script
and to make book art. You can download it from here .
The Virtual Machine contains the Linux operating system Debian 7 with the basic desktop environment Xfce. It is preconfigured to make making book folding art easy. It
has only the really necessary software in it: A web browser, a text editor, a simple graphics program and the script, which can be started directly from the desktop. You
will have to login as the user 'bookartist ' with the password 'test' . If you ever need to install further software or want to create shared folders with your own operating
system, you need the root password , which is also 'test '.
How to proceed
When you have downloaded and installed VirtualBox and 7zip and downloaded the BookArtVM (about 550Mb - it's a whole little computer inside!), you can use 7zip to
extract the BookArtVM file into a new folder.
Then, open VirtualBox and click on File ? Import appliance . Choose the OVF file you have just extracted with "Choose". It will then be imported, this can take a while.
If you have to, adjust the settings vor the VirtualMachine. Especially, if your computer has less RAM than 3 GB, you should reduce the RAM you want to give to the
VirtualMachine to less than a third of your actual RAM.
Start the BookArtVM by selecting it and pressing on the green dart labelled start.
Log in as 'bookartist ', the password is 'test' .
The current BookArtVM version released on 16 March 2014 contains some bug corrections. Be sure to use the most current version!
Download pictures, prepare them with the graphics program and put them into the script folder. You can run the script by double-clicking on the heart icon on your virtual
machine's desktop. Continue at STEP 3 to learn how to choose a good picture.
Image Notes
1. These buttons allow you to start right away.
2. This flag allows you to change the keyboard layout. I preset US-EN, ES, FR and
DE to cover the most frequent ones.
3. The Menu contains a list of all applications, the door next to it is for logging out.
4. This is a screenshot of the virtual machine you can use to execute the script.
Step 2:Make a home for the script
Now, put the script into its own directory , give the directory any name you like (for example: MyBookArtFolder ;-) ).
The script will write files into the directory for you when you run it.
Step 3:Choose a picture
My advice: Keep it simple!
The simpler the image, the less pages are necessary to make a good picture and the easier it will be to recognize which object you folded into your book pages.
You need a picture which fulfills the following requirements:
A picture of a dark object in front of a bright background - preferably, a black object in front of a white background.
The picture must be saved as a png image file, its colormode must be RGB (not indexed, or greyscale)
The picture may not contain transparency. Also no half-transparent parts.
In the picture, there may be no vertical gaps. This means, that, if you would trace any vertical line in your picture from top to bottom, there may be no line, which
is white all the way down. The only white vertical space is allowed to the sides of your object.
There may be only few 'holes' in your object, especially if the holes stack vertically. I suggest having no more than 3 vertical holes directly above one another.
The object should not have very many details. The simpler the shape, the better the result. Silhouettes or single letters are great.
The object should not be too wide - the less pages in the book, the thinner your object should be.
You must really want to fold THAT object, because... it'll take a while. Even if my script spares you the work of preparing and measuring the picture, you will still
have to measure pages and fold pages.... for hours on end.
Examples for good and bad choices are given in the picture.
Put the picture file into the directory where the script is. On the VirtualMachine, this directory (MyBookArt) is already linked on the desktop.
Step 4:Choose a book
You need a hardback book (a paperback will topple over!)
One you don't intend to read (again).
And one with many pages .
How many pages exactly depends on your picture - a wide picture needs more pages than a thin one and a detailed picture needs more pages than a very simple one.
When you think of pages in terms of resolution of the picture, remember that only every second page number of the book is in fact one sheet of paper - and
corresponds to one 'pixel' (or better: slice) in the width of your art work.
So if you think 'Wow, this book has more than 200 pages' - it is really only about 100.
And think of pictures which are 100 by 100 pixels - they are SMALL .
So take a book with many, many pages.
Hint (optional , but useful):
If you want to know the optimal width to height ratio for your picture, put your book upright and fan out its pages. When they have a 'good' distance from each other, so
that you can imagine your picture being rendered well, you can measure the width to height ratio of your book. If you adjust the dimensions of your picture to this (by
adding and removing empty space, not by distorting the image), you can optimize your result.
Step 5:Run the script
Now it's finally time to run the script.
Keep a ruler and the book at hand.
On the command line, go into the directory where the script is (for example, type 'cd /home/yourname/MyBookArtDirectory').
Call the script by entering 'php BookArtGenerator.php '.
Or, if you are running the virtual machine, double-click on the heart icon on the desktop.
The script will now ask some questions.
It will ask
for the number of the first even page of your book
for the number of the last even page of your book
for the height of your book pages (doesn't matter if the unit is cm or inch, only enter the numbers, decimal dot allowed)
for the name of the picture file (for this example: 'yourpicturefilename.png')
Then it will generate 3 files:
tempfile.png: This file is for internal use of the script and will be overwritten with every new pattern you make.
yourpicturefilename_preview.png: This is the preview for you to check that the script has worked as intended.
yourpicturefilename_pattern.txt: This is the pattern file. It contains the folds for every page - one upper fold and one lower fold.
The files will be saved to the directory where you put the script. On the virtual machine, this is the folder linked from the desktop (MyBookArt).
If you run the script again with a picture of the same name, the last two files will be overwritten, so copy them somewhere else or rename them if you want to keep them.
Step 6:Check the preview
Open the file with the filename 'yourpicturename_preview.png'.
You might have to zoom in to see all vertical lines.
Don't worry about the aspect ratio , only check if the object is there, if the pages alternate well and if the level of detail is what you want.
If something's wrong, check that your picture fulfills all requirements mentioned in Step 3 .
If the alternation of the pages looks wrong, try starting at another even page of your book (for example, if the first even page number is 4, try 6 next time). You can also
add or remove whitespace around your object to allow it to be better centered.
Run the script and create patterns until you are happy with the preview. Then proceed to the next step.
Image Notes
1. Here the fold marks alternate, because you can use one sheet of paper only
for one uninterrupted black line - it's either body or foot, but not both.
Image Notes
1. The aspect ratio isn't what you're looking for! It's if the paw is there and the
ear, and if the vertical lines alternate correctly.
Step 7:Print the pattern
Now, you need the pattern.
It is, as you will remember, in the file 'yourpicturename_pattern.txt '.
Open the file.
The measurements are extra fine for pedantic people - meaning they go into 10ths of millimeters (0.01cm) or 100ths (0.01 inch) of inches. You will probably not be able to
make your folds so exact, but I found I could do better than 10ths of an inch and thus get more detail. You can of course round the values, if you prefer.
This is how the pattern is constructed:
The first column tells you which page to fold.
The second column tells you where to fold the top of the page down.
The third column tells you where to fold the bottom of the page up.
Print the pattern out - or leave the file open to save paper and listen to music from your computer while folding.
If you want to print from the virtual machine, I suggest you better create a so-called 'shared folder' (follow this tutorial ) - or just mail the picture to yourself from the
browser inside the virtual machine, which might be by far the easiest method, if you have a web mail account.
Step 8:Put on some good music, or audio book... and FOLD
Now it's the time to MARK and FOLD . This may take some time - and it's a bit meditative.
If you don't like to meditate, put on some music or an audio book :-)
I found that I preferred marking and folding in one step .
You might be more efficient if you mark all pages first and fold in a second step.
The marking and folding in one step has the advantage that you notice errors (like jumping a page number or measuring wrongly) right away . Plus you can already see
your partial result, which provides some motivation.
Cross off the pages in your pattern text which you have already marked (and folded).
It's easy to forget to check for the correct page number and to mark and fold the same part of the pattern more than once...
Mark with a thin pencil, using a long ruler. Put the marks some 2-3 mm away from the border of the page - this way, your marks cannot be seen in your finished project.
Use a 'Geodreieck' or a hard, triangular shape (45-90-45, maybe from cardboard or plastic) to make your folds as precise as possible. Check the pictures to easier
understand what I mean.
Image Notes
1. This is what is called a 'Geodreieck' in Germany. You could also use a piece
of cardboard with a right angle.
Image Notes
1. Make your mark as small as possible and don't paint directly on the rim of the
Image Notes
1. Do you see the little mark?
The triangle protrudes a bit over the rim of the page, this makes folding easier.
Image Notes
1. Fold the page down (or up respectively) to the guiding edge of the triangle to
get a perfect right angle.
Image Notes
1. If you have to fold down (or up) so much that a right angle isn't possible, fold
as far as you can.
Step 9:Admire your result
When you're all through the pattern, put up your new art work. Adjust the opening angle of the book to adjust the aspect ratio. Fan the pages out regularly.
Enjoy your very own, easy-made art work with your own, original pattern! Use it as a gift, as decoration, whatever you like!