For the Computing in the Arts class taught by professor Graeme Bailey at Cornell University, our final project was to create a machine or program that would automate creativity in the fine arts. I worked with a friend, Justin Selig, to create Origami Fill (a GIMP plug-in made with Python) for our final project.
Inspiration for the Project
When it comes to the combination of computational preciseness with a creative flair, the first thing that comes to my mind is graphic design. On the other hand, one of Justin’s passions is origami. For our project, we were searching for the intersection between graphic design and origami.
We took a careful look at origami art, especially the techniques and styles that define it. We paid attention to creases, symmetry, paired regions, and surfaces that were visible or hidden in the completed piece.
What we learned was that most origami art relies only on one side of a sheet of paper; the other side is rarely ever visible in the completed piece. But this posed a problem: the completed piece would often just be one color — the color of the visible side of the paper. How boring!
What makes origami an art is this notion of making something come to life out of nothing. A flower, a bird, a butterfly is born out of a flat lifeless sheet of paper. But how much life is there to the piece if it is just one plain color? We wanted to add even more life to origami art by colorizing it in an elegant way.
With this goal in mind, we looked to graphic art and design for inspiration. In particular, we were captivated by low-poly art. Low poly art strips away excess details and simplifies models into basic polygonal shapes. Low-poly art seems to have this papery feel to it and the subtle variations in color shading adds to this effect.
From looking at low poly art, Justin and I planned to break origami objects into simple polygon surfaces and apply variations in color shading for our desired effect.
The overall concept behind Origami Fill is that a user will supply an image for color inspiration. Then they will chose an origami object to produce a template for. The Origami Fill algorithm will then run to produce a randomized printable template of the origami object.
How It Works
The process begins once the user has an image loaded up to use for determining the base colors. When the user runs Origami Fill, the user is prompted to input a random integer (a seed). The seed is used to determine the image analysis procedure.
There are four modes for the image analysis procedure, thus we use modular division by four on the seed. This allows for randomization to occur, with some degree of control on the user’s end because, for example, it may be more appropriate to do a diagonal image analysis for images with colors distributed in a particular way.
Next, the base colors are selected based on the image analysis. To select base colors, a ten pixel radius is sampled and then averaged for each region being analyzed.
In the final steps, the visible surfaces of the origami object are selected on the template and filled with color. We make sure to pair appropriate regions together to account for symmetry and distinction from other unrelated regions.
A noise-generating color algorithm was developed for Origami Fill to ensure ensure a degree of randomization is possible each time the program is run. Essentially, the noise generating color algorithm uses the base colors to produce (potentially hundreds of) different shades of each of the base colors. The key of this procedure is to generate colors that are either lighter or darker than the base color while minimizing changes to the hue — i.e. we don’t want to generate an orange color if our base color was red.
Noise Generation Algorithm
The noise-generating color algorithm works by using three main variables: sign, delta, and noise.
Sign can take a value of either -1 or 1. The sign determines if we are adding or subtracting from the RGB color values — i.e. we’ll generate a lighter color if sign is 1 or a darker color if sign is -1.
Delta can take on values between 25 and 50. This determines our initial jump in the color values. Values from 25 to 50 are noticeable, but usually not too drastic.
Noise can take on values between Delta +/- 10. Noise depends on the value of Delta, and minimizes drastic jumps in the RGB values.
Without the noise variable’s dependence on Delta, the RGB values would be generated independently. This results in a greater risk of changing the color’s hue, which we want to avoid. When the RGB values are changed within a reasonable range of each other, it changes the shade of the color more than its hue.
Examples of Finished Work
Try It Out!
I hope you like what we came up with! Let us know your thoughts, we’re excited to hear!
Feel free to print out the above images as templates and create your own lively origami art. If you want to try this out yourself, or want to take a look at the source code, you can grab it from GitHub and install the GIMP plug-in.Download from GitHub