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?

dandelany
  • 71
  • 3
  • 1
    I would say it has more to do with the uneven distribution of objects when they all come together. I would imagine that if you could form a perfect circle with the objects they would continue to spin together. One way to get it kind of close to a circle is resize the browser – Adjit Jun 09 '14 at 19:53
  • I, too, suspect that it is worse for unevenly distributed objects - however, this is still a bug, no? Off-center agglomerations don't spin on their own in the real world unless [something else is adding energy to the system](http://en.wikipedia.org/wiki/Yarkovsky%E2%80%93O'Keefe%E2%80%93Radzievskii%E2%80%93Paddack_effect) – dandelany Jun 09 '14 at 20:05
  • 1
    If the laws of physics are accurately replicated, then the force of the elements coming together will cause the object to rotate. Think about planets... Most of the rotation comes about from the conservation of angular momentum. However, that brings up another interesting point... The larger the object, the slower it spins. I think if there was someway for you to get all of the objects to the center to form a nice circle. Or maybe have 1 center object that everything will orbit around – Adjit Jun 09 '14 at 20:26
  • This is a good point re: angular momentum but I don't think that's what's happening here, or at least not correctly(?) For the effect you're talking about, I would expect the spin of the agglomerate to slowly increase as more mass collects close to the center, like a figure skater pulling his limbs in. Instead, it seems to settle to a fairly stable, slowly rotating state first. Then that stable-ish agglomerate slowly starts spinning faster and faster. I suspect that this is due to small "bouncing" between particles that are in contact and shouldn't really be moving anymore but not sure. – dandelany Jun 09 '14 at 20:48
  • Right, I think that is what the main root of the problem is. Because when one particle will hit the agglomerate it separates all of the particles a little bit, and then they pull themselves back together creating the spin. There are times where I do notice it pretty much forms a solid structure at times where it looks stable, but then a stray particle will hit it and chunks will start flying off. – Adjit Jun 09 '14 at 20:53
  • 1
    You're correct. It's a bug related to the instability of contacts. It breaks conservation of angular momentum. It will show up no matter what the starting configuration. – Jasper Jun 10 '14 at 22:14

0 Answers0