[Plugin] Menger Sponge 1.0
-
This plugin is strictly just for fun. The Menger Sponge is a 3D fractal in the Mathematics world. In the computer graphics world you can only draw the first few levels before it becomes too complex to render. However, it still has an interesting self-similar shape, which makes it possible to build using a plugin.
It is constructed iteratively. You start with a cube. Scale the cube down to one third the size, and make 27 copies arranged like the cells in a Rubikβs Cube. Then remove the cube at the middle of every face, and remove the cube in the center, leaving 20 cubes. Merge them together so there are no coplanar edges. This gives you the first level.
The second iteration is the same process, only instead of a cube, you start with the first level sponge, scale it down, and translate 20 copies as before.
The third level is constructed from 20 copies of the second level sponge, and so on. Below is an image of the fourth level, which is probably about as far as you want to go. It has 200k faces, and takes about a minute to generate all the geometry.
You can color the outside by clicking on the component with the paint bucket. The inside faces have a different color for each level. You are not stuck with my color choices. They are grouped by material. So, just open the component, and apply the paint bucket to any face. That will paint all the faces that are the same color.
There is more documentation, and a link to download this plugin, here: Menger Sponge 1.0.
Thanks.
-
Thank you for this, useful and interesting, plugin
-
Welcome Sierpinski and Menger to SCF !
But I don't agree with Regular Polygon when he says on the plugin's page "It is constructed iteratively". I'd say it is constructed recursively, that's the opposite and the basis of the fractal algorithm. Or did I miss something ? -
Hi Didier,
You are correct, the implementation is recursive. What I mean by iterative is that the construction is a repetitive process, where each level is built up from subcomponents of the previous level in the same way.
Nice to see someone is checking the source code.
-
Cool plugin. I do enjoy a bit of maths geekery
-
Very cool plugin, RP...so many new plugins, so little time...
-
Menger in the field
-
Advertisement