File Exchange

image thumbnail

N-level cubic base 3D Koch snowflake

version 4.2 (31.8 KB) by Nicolas Douillet
A function to compute and display a cubic base Koch snowflake, 3D printable ready.

1 Download

Updated 08 Aug 2020

View License

Please check the examples tab (doc) here on the right for a complete description.

Once downloaded, typewrite 'doc cubic_base_Koch_snowflake' or 'help cubic_base_Koch_snowflake' in Matlab console for support.

Cite As

Nicolas Douillet (2020). N-level cubic base 3D Koch snowflake (https://www.mathworks.com/matlabcentral/fileexchange/73216-n-level-cubic-base-3d-koch-snowflake), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

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 coming for 3D printing. Waiting for it, to prevent from creating non manifold edges, just comment lines relative to remove duplicated vertices and triangles (l114-116).

Function to compute and display a cubic based 3D Koch snowflake. Giving the resulting sets of vertices and triangles, it is almost 3D printing ready. Just have to write them in a .ply file for instance. The fractal object thereby created is a fractal sponge.

It is available for 3D printing in my Sculpteo online shop :

- At iteration #3 : https://www.sculpteo.com/fr/print/3_lvl_3d_koch_snowflake/ELtvViUT?uuid=LfMjhe0hALsoQuuGGi4cgh
- At iteration #4 : https://www.sculpteo.com/fr/print/4_lvl_3d_koch_snowflake/KmdcmxcB?uuid=M3T8Lg4kSnhPMZoTzWs9Hh

You may also have a look at some additional views here :
- https://www.flickr.com/photos/153363591@N05/37847151582/in/album-72157689739929586/
- https://www.flickr.com/photos/153363591@N05/37168396184/in/album-72157689739929586/

/_!_\ Since the number of squares is multiplied by 18 from an iteration of the fractal to the following, and unless your computer has very powerful computation abilities, memory, and a very strong graphic card, you should not set nb_iterations parameter value greater than ~ 4 if you want to display the result (main part of the CPU time of this algorithm : nb squares loops on fill3 function)... or else, use your favourite mesh laboratory to do it ;-) /_!_\

Tip : from nb_iterations = 4, and if using write_ply.m you struggle with displaying the set out of Matlab [...] try to replace in the file header "uchar ushort" by "uint8 uint32" this should help ;-)

Updates

4.2

More typo

4.1

Summary

4.0

+ 3D-printing ready option to avoid non manifold edges if true or to optimize the number of vertices and faces if false (by removing duplicata). Update input parsing, help, doc

3.2

Improved remove duplicated vertices function, updates description, improved cover img

3.1

Lighted description with comments... in comment section.

3.0

Remove duplicated vertices and triangles, + display tip in description, + some doc see also links

2.3

Improved title

2.2

All in one file only, updated description

2.1

Updated image

2.0

Removed useless cmpa option, add nb triangles warning, improved input parsing, updated help, doc, description, + my Flikr fractal gallery link.

1.2

+ 3D printing links

1.1

+ 3D printing link

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux