Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There seems to be some numerical instability in the rotation. In the shapes demo, several of the shapes start spinning faster and faster when I pick them up. Particularly when I press the outside edge nodes into the center so that the shape sort of flips inside out, after that the shape just spins continuously when it is in the air.

Another way to exhibit it is to take the center node of the wheel and press it against the wall. The whole shape will spin.



I wrote a verlet based physics engine years ago and had similar issues. Relaxing distance constraints tended to add a bit of angular momentum in to the system. Sometimes having a drag term in the integrator was enough to compensate, but this appears to be in verlet.js already.

Another issue with defining shapes via distance constraints is that they sometimes have alternate solutions / stable minima. For example, you can smash the circle in to the ground and get it to crumple: http://i.imgur.com/UzxbKvJ.png

But, this is still an awesome demo. Good work subprotocol.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: