Menger Sponge Slices

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Start with a cube. Draw nine squares on each face of the cube, forming a 3×3 pattern. Drill out the middle squares across the cube. Take the eight squares left on each face and draw the 3×3 pattern for each one. Drill straight through again. Keep doing that; the Menger sponge fractal is the limit of the process.


This Demonstration slices the Menger sponge by a plane perpendicular to a main diagonal at certain distances.


Contributed by: Robert Dickau (March 2015)
Open content licensed under CC BY-NC-SA



Snapshot 1: a cube sliced diagonally reveals a hexagonal face

Snapshot 2: different depths of slices reveal similar shapes

Snapshot 3: with no slice, the figure is the Menger cube

Inspired by John D. Cook [1].


[1] J. D. Cook, "Code to Slice Open a Menger Sponge," John D. Cook (blog). (Mar 23, 2014)

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.