実例 非直交反射

非直交反射

この例は、傾斜面で跳ねるボールを示しており、 反射のためのベクトル計算を使用して実装されています。

このコードは、 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!