This is a simple Physics simulation I wrote in Javascript.
https://johnenverga.github.io/physics.html
It's still a work in progress. I'm working on the collisions, implementation of other objects, and other things.
https://johnenverga.github.io/physics.html
It's still a work in progress. I'm working on the collisions, implementation of other objects, and other things.
cool!
why does radius 10 bounce forever and radius 11 more normal?
Thanks!
It has to do with the "compression" value. The compression controls the degree of the bounce - basically:
bounce factor = compression / (2 * radius)
...so...assuming that you didn't change the compression...the bounce of radius 10 would be 1 - hence it would bounce forever. But the bounce of radius 11 would be 20/22 or a little less than 1, providing a more "realistic" bounce.