Please first check the examples tab (.mlx doc) here on the right for a complete description.
Once downloaded, typewrite 'doc Menger_sponge' or 'help Menger_sponge' in Matlab console for support.
To benefit from the file documentation attached, be sure to download the file, not to just copy and paste it.
Mathworlds (2021). Sierpinski-Menger sponge (https://github.com/NicolasDouillet/sierpinski-menger_sponge/releases/tag/v3.0), GitHub. 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!