Fractal-Tree-animated-with-canvas:使用requestAnimationFrame创建一棵成长的分形树

时间:2024-05-04 17:37:44
【文件属性】:
文件名称:Fractal-Tree-animated-with-canvas:使用requestAnimationFrame创建一棵成长的分形树
文件大小:3KB
文件格式:ZIP
更新时间:2024-05-04 17:37:44
JavaScript 分形树用画布进行动画处理 使用requestAnimationFrame创建一棵成长的分形树 分形的创建是基于复发。 为了创建分支,我们无限重复一个函数,该函数在每次迭代时都会“自我修改”。 我们将考虑美学方面,并设置限制以选择分支的数量及其相对位置。 该树分为三个部分: 根:调用根函数(); 基于数学函数y = 1 /(ln(x-0.64))+1创建半根,然后将其投影到垂直对称轴上。 分支:init()函数的调用; 通过调用两个函数draw()创建一个分形分支; 和firstBranch(); 子分支:调用littleBranchRight()函数; init()函数; 接受三个论点 init(largeur de branche en pixel, angle de rotation initial en degré, longueur première branche
【文件预览】:
Fractal-Tree-animated-with-canvas-main
----Fractal Tree()
--------fractal_branche.js(5KB)
--------canvasFractal.php(181B)
----README.md(1KB)

网友评论