这是通过递归渲染一个简单的树状结构的示例。分支角度根据水平鼠标位置计算得出。左右移动鼠标来改变角度。基于 Daniel Shiffman 为 Processing 编写的 递归树示例。
递归树: Based on Dan Shiffman's Recursive Tree Example. Revised by Darren Kessner. From 2024 onwards, edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.
You can find the code history of these examples here: pre-2023 example, 2023 code. You can suggest improvements by contributing to the current website!