EulalieCoevoet / AdaptiveMerging

With adaptive merging we reduce computation time in rigid body simulations.
https://eulaliecoevoet.github.io/AdaptiveMerging/
42 stars 11 forks source link

Pinning to the inertial frame might not be such a bad thing after all? #13

Closed EulalieCoevoet closed 5 years ago

EulalieCoevoet commented 5 years ago

Two options. We can merge everything into one clump if they are connected by the same body... (i.e., in the inertial frame), or we can try to keep them into different merged islands, but in the inertial frame.

I think it is easiest to consider simply merging pinned bodies into the collections and seeing what happens! I think it will simply work!! Just want to make sure that the velocity of the merged body is zero, and perhaps propogate the pinned property up to the RigidCollection. COM doesn't need to be set or changed, while minv and jinv for the collection are simply zero.

paulkry commented 5 years ago

The more think about this one, the more important I think it is. I would have the colour of the merged collection be something specific in this case (e.g., a blue shade)

paulkry commented 5 years ago

This has been pushed, and largely works, but exhibits a minor error in the single step PGS cleanup which seems related to other scenes not involving the inclusion of pinned bodies in collections.

If it helps, could help to have a checkbox to prevent merging pinned bodies, i.e., to compare bad behaviour in different test scenes.