Tom had some geometry homework today which involved calculating the surface area of a unit cube with a 1/3 wide square hole punched through the center of each face. Sort of a level 1 Menger sponge. The reminded me of a demo I’ve written for a number machines over the years. It was one of the first graphics demos on each of the machines we designed at Stellar. So I sat down and wrote it in Processing. As you can tell, I stole some code from the RGBCube example sketch.
Source code: blend_cube
Built with Processing
For extra fun, try hitting the ‘b’ key. Once it’s in that mode, the space key clears the image and the ‘b’ key gets you back to the original mode.