Please first check the examples tab (doc) here on the right for a complete description.
Once downloaded, typewrite 'doc Menger_sponge' or 'help Menger_sponge' in Matlab console for support.
Nicolas Douillet (2020). Sierpinski-Menger sponge (https://www.mathworks.com/matlabcentral/fileexchange/73447-sierpinski-menger-sponge), MATLAB Central File Exchange. Retrieved .
Write and save the vertex V and the face sets T (in a .ply or .stl file for instance) before sending it to your favorite 3D printing manufacturer. Such file format writer is not included here, but may easily be found on this file exchange.
Display function based on fill3 is still very greedy in cpu time as well as the number of faces very quickly grows. From nb_iterations >= 3 it becomes very slow to get a display. My advice is to save V and T, to write a file and then to use another 'way' to display it (with a more efficient 3D display engine).
New version is now available.
New version is coming for 3D printing. Waiting for it, to prevent from creating non manifold edges, just comment lines relative to remove duplicated vertices and triangles (l121-123).
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!