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 WAMP.org), 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!
Update 3: As still many people had problems with understanding how to setup and use a virtual machine, and how to access their picture files on their real computer from there, and how to edit pictures to not contain transparencies, I decided to make a new version of the script, which should be a lot easier to use. This new version is now a python script, it requires installation of Python 2.7 and it also requires the installation of PILLOW. Install instructions for Python for Windows can be found here (also install pip!), then install PILLOW, as described here.
You can get the Python version of BookArtGeneratorhere. For usage, follow the instructions in the readme file. For understanding how to select a good image and book, what to do with the files the program creates and how to fold, jump to steps 3, 4 and 6 to 9, and for the rest, follow the instructions on your monitor.
The result of this can be foundin this really easy online version of the bookart generator(with added features, too!). So if you don't need an offline version, just visit my new website and use the online version. Tested with Firefox. If you've got any problems with other browsers (not with IE, I really don't care about that!), please report via a comment to the linked article on the website.
Enjoy! (and note the program licence if you decide to make derivative software).
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 http://www.php.net/ .
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 imagemagick.org the software installation files for Windows and Mac OS/X are also available.
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 VirtualBox.org . 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 7-zip.org. 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.
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, where you will learn how to choose a good picture.
OPTIONAL: Update and install additional software
It is also a good idea to update the Virtual Machine. You can do so
by opening the terminal (click on the little black box in the bottom bar), and then login as administrator:
Then update the package index and install all available updates:
apt-get update [Enter]
apt-get upgrade [Enter]
and if it tells you about some changed behaviour, just hit q to proceed, answer questions about whether to keep a locally installed version of a file with that you want to keep the current version.
You can now also install additional (free!) software, for example, The Gimp, an advanced graphics editing software, by just typing:
apt-get install gimp [Enter]
or install Inkscape, a great vector graphics editor by typing:
apt-get install inkscape [Enter]
or install any other available software by first searching for a keyword with
apt-cache search [Enter]
and then selecting a program from the list this shows to use with
apt-get install [Enter]
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
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.
Step 7: Print 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.
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
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.
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! If you made a nice piece of art, share it in the comment section!
Asking for help
If you need help with usage of the program, and would like to ask in the comments, please:
- Look through the comments first. Many people have asked questions. Most questions are being asked repeatedly. Probably your question, too, has already been asked and answered. Also, please read the Instructable slowly (rumour has it that people asked for download links...).
- Mention which version you installed (Virtual machine, PHP script, Python script?)
- Also mention your operating system (including version number).
- Describe your problem in as much detail as possible (please no 'This doesn't work' or 'is not compatible' or 'dying computer' or 'still no joy'. I'm no longer answering those. Usually, when I then ask back to gather the info I need, I don't get an answer from the person who asked the question.) Answer at least these questions: What did you do? What happened? What did you expect to happen?
- Add screenshots. These will help me to understand what it's about, even if is difficult for you to accurately describe your problem.
- If there's a problem with your picture, or with the preview images created by the program, upload your picture file(s) somewhere (not to facebook, not to instructables, only somewhere where the file itself will not be changed by the internet service) and include a link to the file(s). You can use an image hoster like http://imgh.us/
- Don't ask the question more than once (i.e. by sending a message and writing a comment)
- If you found a bug in the python program or have a feature request for it, please report this on the corresponding github page.