Sunday, May 6, 2012

Creating a Menger Sponge in Minecraft

Level 4 Menger Sponge:

The Menger Sponge is a fractal design. I got the idea to create one in Minecraft last year; it is perfect for Minecraft because a Menger Sponge is a cube composed of smaller cubes. At the time, Minecraft had a ceiling height of 64m, so a level 4 Menger Sponge - at 81 metres cubed - was the largest that could be constructed (the height has since been increased, making a level 5 sponge now possible).

I started digging a pit in preparation for construction, but before I was ready, Minecraft added its "creative mode", making movement and construction so much easier, so I started over with a new game. I dug a pit much larger than the dimensions necessary, so that the cube could be largely below grade and viewable from some distance. I added a floor of glowstone as a sort of backlight so that the cube would be easily visible at night. But partway through excavation, it occurred to me that clearing the pit would be faster using TNT, so I covered the glowstone floor and steps with obsidian to protect them from TNT. Once the pit was cleared, I uncovered the floor again and construction of the cube began.

A cube of dimensions 81 metres cubed would be composed of 531,441 blocks; a Menger Sponge of the same dimensions is composed of only 160,000 metre-sized blocks because of the pattern of holes.

Construction took months as I was only working a bit at a time in the evenings after work, and not dedicating every spare moment to it (I also took a month off to work on other things). I avoided becoming obsessed with it, and thus the work - while tedious at times - became somewhat therapeutic.

The idea of adding a roller coaster was in my mind from the beginning, but once completed I have to admit that part of me didn't want to mess with the aesthetics of the cube.  Fractals are so lovely.  In the end, though, the urge to build a roller coaster had been as strong as the urge to do the Menger Sponge.

The idea of constructing a Menger Sponge is so well-suited to Minecraft that I discovered that others have already done it. YouTube has videos of others, including one showing the painstaking construction of a level 4 cube in non-creative mode, and also a look at a level 5 cube. From what I've seen, however, mine is the only one which incorporates a roller-coaster. =)

Tour through the Menger Sponge:





 Construction of the Menger Sponge:



No comments: