File Exchange

image thumbnail

N-level Sierpinski sphere / "Spherpinski"

version 3.2 (89.2 KB) by Nicolas Douillet
A function to compute the Sierpinski sphere (object I named the "Spherpinski") with some options.

1 Download

Updated 12 Feb 2020

View License

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

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

Cite As

Nicolas Douillet (2020). N-level Sierpinski sphere / "Spherpinski" (https://www.mathworks.com/matlabcentral/fileexchange/73285-n-level-sierpinski-sphere-spherpinski), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

{Error using ./
Matrix dimensions must agree.

Error in Spherpinski (line 167)
V1 = V1./D1;

A set of functions to compute a Sierpinski sphere (fractal 3D surface) with some options (nb_iterations, option_fill, option_display). The resulting sets of vertices and triangles are also available for further computations.

The algorithm principle is based on the projection of the Sierpinski triangular faces of a regular octahedron on the surface of the unitary sphere.

NB : function sample_triangle is included, but may also be found independently here :

https://fr.mathworks.com/matlabcentral/fileexchange/64395-sample_triangle?s_tid=prof_contriblnk

You may also have a look at some additional views here :

https://www.flickr.com/photos/153363591@N05/albums/72157689739929586

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 may help ;-)

Updates

3.2

cover img new test

3.1

Improved remove duplicated vertices function, cover img, updated description

3.0

Remove duplicated vertices and triangles, + Sierpinski ball see also link in doc, free description from comments, comments + tip in comment section.

2.1

All in two files only, updated description

2.0

+ fix rotate_3D Y rotation matrix bug, add nb triangles warning, improved input parsing, updated help, doc, description, + Flikr links

1.1

Typo

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