20090326

Pixeling, Or, Putting Hearts on Your 7x7x7


Pixeling is a technique that I discovered to make certain types of pretty patterns on NxNxN cubes. It affects the centers, only, in a large series of 3-cycles. Specifically pixeling is used to generate patterns where a certain shape of centers is moved in two 3-cycles, from (say) the U->R->F faces and D->L->B faces, in a very efficient way. An example is the hearts picture at left, which can be created with just 11 block turns (i.e. turns of a group of adjacent slices all in the same direction)! If you ask me that's ridiculously efficient.

Here's the motivation (with pictures below). You'll need to try these patterns out to understand where pixeling comes from. First we start with the basic center pattern on the 3x3:
M E' M' E.
This just moves the centers around. We can also do this on the 5x5 (or any NxNxN cube, really):
2-4r' 2-4u 2-4r 2-4u'.
But on the 5x5 there are related patterns. The following show that you can move blocks of centers around (or a single center), and that the blocks don't even need to be contiguous:
2-3r' 2-3u 2-3r 2-3u'
(2R' 2L) (2U 2D') (2R 2L') (2U' 2D).



You can basically now make any pattern we want using a series of these block maneuvers, and the efficiency on those patterns is not bad at all. But we can do better. Try this maneuver on a 5x5, which creates the staircase pattern to the left:
2R' 4U 3R' 3U 4R' 2U 2-4r 2-4u'
This is the most introductory example of pixeling. Do you see what is happening there? It's a bit tricky, but try to keep track. Every time we do a U turn, we are basically storing a line of three centers on the L-face. Together, those lines make the entire center (and the shape that we want to pixel in, which is inside it), which is done when we make the 2U move. Then we simply return the vertical slices to their original position and move all the horizontal slices back. This can also be done using the vertical R slices to store the center lines in the D face, of course, and some patterns turn out to be more efficient one way than the other, so it's important to try both ways.


We're not limited to just R' turns, though - sometimes we want to use R slices to remove a center from our shape. To the left is an arrow shape for the 7x7 that can be created like this:
2-6r' 4U 2R 2L' 3U 3R 3L' 2U 2-3d' 4R 2-6u'
Notice that before every time we do a turn of a horizontal slice in the U direction, we set up the R slices so that only the ones which contain the centers we want in our shape are misaligned. Also, this time we didn't do the U slices in order, but this is also fine; the pixeling maneuver still works.

The end result is that there are many, many ways to pixel any given shape. It will take a bit of trial and error to do a shape efficiently, but the efficiency can be really amazing. If you're making a shape yourself, remember to try both directions (vertical and horizontal slices to set up the shape) and a few different orders of slices. If one of those cycles in the wrong order that you want, you can just invert the pattern. Finally, let's return to that heart pattern. Here's the best we can do for the heart pattern with blocks and with pixeling, respectively:
Blocks: (2R' 2L 3-4u 2R 2L' 3-4u') (3R' 3L 2-5u 3R 3L' 2-5u') (4R' 3-6u 4R 3-6u') (16 moves)
Pixeling: (3-4u 2R' 2L 2-3d' 4R' 2D 2U 3R' 3L 2-5u' 2-6r)' (11 moves)

Happy patterning! Thanks go to Werner Randelshofer for the cube animation applets and to Joël van Noort for his NxN ImageCube (which I used to generate the images you see here).

2 comments:

Unknown said...

Can you please explain 3-4 and 2-6 and all the signs for which turn to make. Thanks

Anonymous said...

Online Casino - KD Casino
Play online casino งานออนไลน์ games at KD. Enjoy the fun of traditional casino games from the comfort of home. Make worrione your home planet kadangpintar shine with the hottest slots, table games