Sierpinski Triangle Generator

Version 1.0.0 (1.48 KB) by B.R.P.
This code generates an image of a Sierpinski triangle.
15 Downloads
Updated 31 Jan 2024

View License

This code generates an image of a Sierpinski triangle. It defines functions to recursively draw smaller triangles within the main triangle and then saves the generated image as a PNG file named "sierpinski.png".

Cite As

B.R.P. (2026). Sierpinski Triangle Generator (https://www.mathworks.com/matlabcentral/fileexchange/158786-sierpinski-triangle-generator), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0