image thumbnail


version 1.0.1 (88.8 KB) by Nathaniel Barlow
Makes a pile of random leaves. Make some autumn decorations for your office or home!


Updated 17 Oct 2019

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This code take advantage of Hamid Naderi Yeganeh's wonderful parametric curves that describe oak and maple leaf shapes [1] and MATLAB's built-in Autumn colormap.

After using some randomization on the colors chosen within the colormap, the leaf coordinate, and leaf angle, we have ourrselves a nice little leaf pile generator! Why wait until Mid October when you can experience those beautiful few weeks all year round within the comfort of your MATLAB console?

[1] Hamid Naderi Yeganeh, Scientific American, March 16 2017,

Cite As

Nathaniel Barlow (2022). leafpile (, MATLAB Central File Exchange. Retrieved .

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

Inspired: leafpile3D -- minor mods

Community Treasure Hunt

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

Start Hunting!