File Exchange

image thumbnail

Spherpinski

version 4.0 (71.8 KB) by Mathworlds
Function to compute, display and save the fractal Sierpinski sphere at any iteration / depth level.

3 Downloads

Updated 20 Nov 2020

View Version History

GitHub view license on GitHub

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

Once downloaded, typewrite 'doc Spherpinski' or 'help Spherpinski' 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.

Cite As

Mathworlds (2020). Spherpinski (https://github.com/NicolasDouillet/spherpinski/releases/tag/v4.0), GitHub. Retrieved .

Comments and Ratings (5)

rizwan azam

Mathworlds

Ok, I just download it and ran a series of tests with a variety of input parameters. Everything look fine to me. I get in return the point set V, the triangulation T, and the display when I whish. Could you please check again your code, and especially also you have not modified the files ? Could you download and try again ? Thank you.

Mathworlds

Hi 风小子 zeng, Thabk you for this report. Could you copy and paste your piece of code in comments -or send it to me by pm- for me to reproduce and solve this error ? Thank you. Best. Nicolas

风小子 zeng

{Error using ./
Matrix dimensions must agree.

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

Mathworlds

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

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!