nature-of-code / noc-examples-processing

Repository for example code from The Nature of Code book
MIT License
2.56k stars 950 forks source link

[+] Add ballRadius variable to neglect penetration through the wall #115

Closed sreekesari-vangeepuram closed 3 years ago

sreekesari-vangeepuram commented 3 years ago

In vectors, the ball penetrates into the boundary (wall) of length = radius of the ball. To neglect this a new variable is introduced to bounce the ball right after hitting a boundary.