예제 비직각 반사

비직각 반사

이 예제는 반사를 위한 벡터 계산을 사용하여, 경사진 표면에서 튕기는 공을 시뮬레이션합니다.

이 코드는 새로운 벡터를 만들기 위해 createVector() 함수를 포함한 p5.Vector 클래스를 광범위하게 사용합니다. 또한, 벡터 계산을 위해 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!