2

I've been playing with PhysicsJS and noticed some odd behavior with bodies that attract each other using the 'newtonian' behavior.

One example of this behavior is on the "Newton's Revenge" demo. At first, all the bodies start to glom together as expected. However, once lots of them have collected in one aggregation, the whole thing begins to spin faster and faster. Eventually centrifugal force dominates gravity and they fly apart.

Any ideas why this happens? It seems to break conservation of energy/angular momentum. Is it maybe related to this issue about bodies in contact with one another being unstable?

Assuming it is a hard-to-fix bug in PhysicsJS, is there any easy workaround to prevent it from happening?

4

0 回答 0