示例 非正交性反射

非正交性反射

这个例子演示了一个球在倾斜表面上弹跳,采用了向量计算来实现反射。

这段代码广泛使用了 p5.Vector 类,包括 createVector() 函数用于创建新的向量,以及用于向量计算的向量方法 add()dot()

Creative Commons BY-NC-SA license badge

非正交性反射: Based on Processing example by Ira Greenberg. Ported by David Blitz. 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: 2023 code. You can suggest improvements by contributing to the current website!