How To Create Your Own Rubik's Cube Mosaic
How To Create Your Own Rubik's Cube Mosaic
Materials
GIMP software – download for free at http://www.gimp.org/
Rubik’s Cubes – borrow 100 or 225 Rubik’s Cubes at no charge for 8 weeks. For more details follow this link:
http://www.youcandothecube.com/cube-mosaics/
Introduction
As you can see in the picture above, a mosaic can be made by using an array of Rubik’s cubes. Each sticker on one face
of a cube acts as a “pixel” (9 pixels for each 3 x 3 Rubik’s Cube) and each cube gives you 6 colors in your palette to
choose from. There are many different ways a mosaic can be created, and there are many variations that can arise
when creating one. This guide was created by a teacher and students that were new to this process for others that are
new to the process, so this not intended to be comprehensive, but instead to give an introduction to mosaics and how to
do a very basic conversion. Good luck!
However, even with these challenges, you can still have fun and create nice mosaics – it just might take a little time to
get used to. The You Can Do the Rubik’s Cube Program will lend you sets of 36, 100 or 225 cubes to create Mosaics for
an 8 week period for FREE. http://www.youcandothecube.com/cube-mosaics/
Step 1 – Let’s cube some 2d math!
You could take all your Rubik’s cubes and make a square and make your picture fit into that square, but that’s adding an
unnecessary limitation on top of those we just talked about. Doing a little bit of math we can come up with a list of
possible mosaic dimensions (the height and width). Once we have a picture, we can select the dimensions that most
closely match.
You can now look at the range of lengths and widths you have to choose from, however, you can’t choose just any
height and width that give a product equal to your total pixels. Our example above had 2025 pixels (225 Rubik’s Cubes).
You cannot make a mosaic that is 81 pixels wide by 25 pixels tall. Remember that when actually building the mosaic you
are placing 1 cube at a time, which is 9 pixels at a time. This also means the height and width go up by 3 pixels at a time.
The height of 25 is not evenly divisible by 3, so we would not have enough cubes. For now, it will be simpler to keep our
units for area as cubes instead of pixels.
Another way to generate this list is using a spreadsheet. Rubik-Mosaic-Helper is an Excel spreadsheet that was created
to generate this list with the only input being the number of cubes. The spreadsheet is completely unlocked to
encourage users to look at the formulas used in the cells and look at the logic involved to see how these lists are
created.
Analyzing a picture
A picture’s resolution is usually given in pixels as height x width. We now want to see the resolution in total pixels to
compare to our mosaic constraints.
Example: Your picture is 1600x1200 => hp = 1600, wp = 1200
hp: height (in pixels) hp wp = pt
wp: width (in pixels) hp wp = pt (1600)(1200) = pt
so, the picture is 1,920,000 pixels => 1,920,000 = pt
This is why we came up with the total pixels number for the mosaic earlier. You can now compare the pixels we need to
what we actually have. The picture has almost 1000 times more pixels than our mosaic!
Step 2 – Smart image selection
This step becomes much more important if the number of cubes available to you is smaller. The general rule of thumb
here is to find a picture that coincides with the 2 main challenges of a Rubik’s Mosaic: 1) the fewer the number of colors,
the better, and 2) the fewer the number of total pixels the better. It was through trial and error that we found image
selection made the biggest difference in getting a good final result. Your results may differ, so play around! The
examples shown below will actually use a different image than that which we used to make our final mosaic to better
highlight some of the difficulties that arise from selecting a more difficult starting image.
Instructions on what to do within the GIMP program are indented from the rest of the text.
Open your target picture in GIMP:
Go to File → Open
Select your image
Cropping
First make sure the image you’ve selected is as small as possible. In our example we started with a 1600 wide x 1200 tall
picture, but decided to focus just on the horse’s head, and cropped to 320 wide x 830 tall. Your new pixel size can be
put into the mosaic helper spreadsheet.
In the Toolbox:
Select the “Rectangle Select Tool”
Scale
You now should have a list of possible height to width ratios and their pixels (either on your own or using the provided
spreadsheet). The Rubik’s height to width ratio that most closely matches the picture’s ratio is now chosen, and the
corresponding pixels are now used to set the pictures height and width. You are selecting only one number to use based
on this logic:
If ( Picture height:width ratio ) > ( Rubik’s Cube height:width ratio ), then ( use Height ), Else ( use Width ).
If you used the spreadsheet, column H will tell you which Rubik’s pixel number to use when setting this.
In GIMP, select “Image”, then “Scale Image” to get the scale image dialog window. Note the blue oval is highlighting a
chain icon. This icon represents whether or not the ratio of height to weight should be fixed. The default is fixed. If you
click this the icon changes to a broken chain, and this means that your final image will be more distorted. The trade off
here is distortion vs lost resolution, and we have usually chosen decreased resolution, but your results may vary. The
example will use a fixed ratio to minimize distortion.
Click the number in the “Image Size” field that corresponds with whichever dimension you have just determined to use
(our example is Width = 27). Press the tab key to select another field, and you should see the other dimension update to
keep height to width as close to the original ratio as possible (in this example our height is now 70 instead of 75 – this
shows how much resolution you have just lost). Click “Scale” and your image is now very small. In the bottom of the
image window you can make the percentage larger to zoom in. Your image is now the correct number of total pixels!
Color Palette
The Rubik’s Cube has 6 colors White, Yellow, Blue, Green, Red, and Orange. We are going to convert our picture to only
use these 6 colors.
Levels
Click “Colors”, then “Levels…” to open the Levels dialog window:
Input Levels in this window is actually one of the most valuable
tools to use for any image manipulation. In this window you can
fix a number of mistakes made when a picture was taken. In the
example to the right, you are looking at a graphical representation
of shadows, highlights, and midtones. The X axis is the scale from
black (0) to white (255), and the Y axis is the number of pixels at
each particular level. In the example, we can see that there are a lot of pixels in this picture that are white, or very
nearly white due to the larger Y values at the far right of the graph. There are 3 settings here that we are going to
adjust: Black level (also called black point or shadows), White level (also called white point or highlights), and Mid tone
(also called midpoint or gamma). Black level takes the value you have selected and makes all pixels equal or below that
value black. If you slide from 0 all the way up towards 255 you will see the picture fade to black. White level works the
same: all values above it become white. As you move black and white levels closer to each other, you are removing a
lot of colors (recall that our goal here is to eventually have only 6 colors). The gamma (or mid point) setting changes
from lighter/more color to darker/less color as you go left to right. Changing all of these values would also be equivalent
to changing contrast and brightness, but within the levels screen you have much more control over the settings. You
should now spend a fair amount of time playing with these values and watching how they change the image. The only
rule to follow here is you must bring black level and white level much closer together, but where they are on the chart
will vary for different pictures. For a lot of pictures this step will make the background simply disappear. If instead
your background is blending into the picture in a bad way, you might need to selectively delete it. Here is where we
ended up on our example, but there are many other choices for levels that also could have worked, but just looked
different:
Color Mode
While the number of colors has been drastically reduced already, we are now going to fix the number at 5 or 6. To do
this we are going to use a color mode called “indexed color”. This means we select the exact colors to use and GIMP will
change each pixel to its nearest color in the palette.
5 or 6 ???
It turns out that for a LOT of the pictures we have wanted to convert, the green color on the Rubik’s Cube doesn’t blend
as well: White through red blend very well and red to blue typically does
ok. However, blue to green often doesn’t look very good.
Once you try this a few times, it’s easy to switch colors around quickly.
Switch to Indexed
Click “Image”, then “Mode”, then “Indexed…” to open the “Indexed Color Conversion” dialog window.
Click “Generate optimum palette”, and enter “6” for maximum
number of colors.
You can now see the 6 color palette that GIMP has selected based on the colors
that were left after setting levels. This is another method of interpolation;
however, GIMP doesn’t allow you to have any say in the implementation as
they do in other situations (like we saw in scaling).
Right click on any color, and select “Edit color…”. There are many different
methods available to select the Rubik’s Colors. Here are some example HTML
codes for them:
Try Again?
As you do this more, you will start to get much faster at this, and you will start to know whether an image will come out
before you get there. One thing you must try with some image is to change up the order of manipulation. Since so
much of your final image comes from some mysterious math being done by the computer, changing the order can
dramatically alter the final product (for better or worse). If you decide to change up the order of manipulation crop
really should always be first, and if you do Indexed before levels, just don’t do levels at all… Here’s another example of
order:
Crop (this should always be first) >> Levels >> Indexed >> Scale >> Convert
Mosaic Time!
Building Instructions
Now you need to add some gridlines to your image, and decide on how many sections to break down into. Typically it
will make it easier for builders if the grid sizes are smaller. It makes it more manageable to get built without errors.
Then make digital copies that can be zoomed by the builders, or print out the grids. We opted to print a couple “big
picture” copies and then a zoom in of each grid:
Building Logistics –
You’ve gone to all this effort to make an image, then you’re going to put forth a bunch more to actually build it. Please
make sure you’ve thought about how people will see this before you get to that point! Here’s some thoughts/ideas:
1) Typically these will have more impact if people can view it from far away and up close.
2) Think about making a stand for your mosaic. In the example picture at the beginning of the document you
can see some wood framing. This was custom made for this project. The entire assembly could be tipped up
to about 10 degrees from vertical (totally vertical could make them fall!) to be seen from farther away.
3) Set up a camera on a tripod and take some video of the mosaic being made—then use some editing
software to speed up that video to make the building process time-lapse!
4) Make an event out of the building process
a. Find a sponsor—put some logo/ad behind where the cubes will go. The time-lapse will be extra fun
then! A sponsor might also help you finance getting more cubes!
b. Have lay people try to help solve cubes for the mosaic—it’s actually much easier than learning to solve a
cube, since it’s only solving one layer.