日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【源码】leafpile3D:三维落叶飘零模拟

發布時間:2024/1/18 编程问答 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【源码】leafpile3D:三维落叶飘零模拟 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

這是leafpile.m的三維擴展,包括添加物理的能力(目前是我的微分方程學生的HW作業)。

This is a 3D extension of leafpile.m and includes to ability to add physics (currently the HW assignment for my Differential Equations students).

同樣的,這個代碼只是讓重力單獨作用在樹葉上。

As is, the code just lets gravity act alone on the leaves.

該代碼利用了Hamid Naderi Yeganeh描述橡樹和楓葉形狀的奇妙參數曲線[1]和MATLAB內置的秋季色彩圖。

This code takes 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 coordinates, roll, pitch, and yaw, we have ourrselves a nice little leaf pile generator!

當你可以在舒適的MATLAB控制臺中體驗一年四季的美好時光,為什么一定要等到10月中旬呢?

Why wait until Mid October when you can experience those beautiful few weeks all year round within the comfort of your MATLAB console?

這段代碼將在我的學生HW作業完成后用一些現實的阻力定律進行更新。

This code will be updated with some realistic drag laws after my students’ HW assignment is due.

最終加入一些滑塊控件,就像肖恩·德沃斯基(Sean de Wolski)去年為2D葉堆代碼所設計的那樣。

I’d also like to eventually incorporate some slider controls like Sean de Wolski did for the 2D leafpile code last year.

[1] Hamid Naderi Yeganeh, Scientific American, March 16 2017, https://blogs.scientificamerican.com/guest-blog/how-to-draw-with-math/

更多精彩文章請關注公眾號:

總結

以上是生活随笔為你收集整理的【源码】leafpile3D:三维落叶飘零模拟的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。