File Exchange Pick of the Week

Our best user submissions

Leaf Pile 3D

Sean's pick this week isleafpile3dbyNathaniel Barlowand theextended version with dragbyChris Verhoek.

Last year Ipicked leaf pilewhich generated pretty leaves in 2d. Well now there are 3d options! Nathaniel has extended the 2d version to show the leaves falling with gravity.

leafpile3D(60)

However, it appears he wrote this so that his students could extend it and add physics to it. I don't know of Chris is one of his students or not, but he extended it and added variable drag based on leaf type, and rotation. I find I'm just sitting here waiting for that last leaf to hit the ground.

leafpile3Dd(30)% added d at end to disambiguate

I also like some of the code changes that Chris made. Specifically, keeping one command per line and splitting some of the longer lines into multiple for readability or better interpretability with source control.

你可以看到在MATLA比较的两个文件B by selecting them and comparing to each other or by callingVisdiff.

Visdiff("leafpile3D.m",“ LeafPile3DD.M”)

注释

尝试一下,让我们知道您的想法这里or leave acommentfor Nathaniel orcommentfor Chris.



与Matlab®R2020B一起出版

|
  • print
  • send email

注释

To leave a comment, please click这里to sign in to your MathWorks Account or create a new one.