Static
center_'center spin': There are two stationary blocks with a third block in between them; the center block is spinning and will simultaneously hit the other two blocks. This is similar to the 'one hits two separate' scenario, except its a spinning block instead of a translating block that causes the collision. There are no static contacts so either ImpulseSim or ContactSim shows the same results. This corresponds to the 'center spin' version of the interactive SimultaneousCollision test.
Static
Private
commonStatic
joint_Show that get same results with elastic or inelastic joints.
Static
joint_Show that get same results with elastic or inelastic joints.
Static
joint_The simplest case of a 'spinning joint': two bodies connected by a joint, they are rotating about the joint at different rates. This shows that we are unable to keep spinning joints tight with just contact force calculations.
Static
joint_Two rectangle blocks are connected by a joint; the blocks are at rest with a ball object in contact with them on their right; from left a ball object strikes the jointed rectangle blocks.
Static
joint_Two blocks are connected by a joint and lie on the ground; a third block collides into the connected blocks. This is a fairly simple test of joints and contacts during a collision.
Static
one_Static
one_Static
one_Static
one_Two balls are inside a rectangular frame. A third ball strikes the frame from left. This causes an infinite series of collisions, but certain settings for the collision handling can cope with this problem. See Physics Based Animation by Erleben, et. al. Chapter 6-2 'Multiple Points of Collision'.
Static
one_Static
one_Static
one_'one hits two separate': a moving block hits two separated balls simultaneously. The result depends on the type of collision handling used. Because there are no static contacts, but only two dynamic collisions, we can use ImpulseSim here (don't need to use ContactSim).
Static
one_'one hits wall': Square block collides into a wall, both corners simultaneously. The result depends on the collision handling mechanism.
Static
side_'side spin': There are two stationary blocks in resting contact, with a third block nearby; the third block is spinning and will hit one of the two blocks. This is similar to the 'one hits two' scenario, except its a spinning block instead of a translating block that causes the collision. Because this test involves resting contacts, we must use ContactSim. This corresponds to the 'side spin' version of the interactive SimultaneousCollision test.
Static
test1_With sequential or hybrid collision handling, the block bounces straight off the wall.
Static
test1_With serial collision handling, the block starts rotating.
Static
test2_With simultaneous collision handling, all the balls are moving after the collision (which is physically wrong, but it is how it should behave).
true gives round balls, false gives square blocks
Static
test2_With serial or hybrid collision handling, the result is only the right-most ball is moving.
true gives round balls, false gives square blocks
Static
test2_'one hits two': A ball (or square block) on the left moves to hit two balls that are in resting contact. The result depends on the type of collision handling being used. Because resting contact is involved, we need to use ContactSim instead of ImpulseSim.
the ImpulseSim to add the objects to
additional distance between the stationary objects
true gives round balls, false gives square blocks
Static
test3_With simultaneous collision handling, all the balls are moving after the collision (which is physically wrong, but it is how it should behave). OCT 2011: for some unknown reason, the “two hits one asymmetric” multiple collision test now works identically for all collision solvers. MAY 2016: I've solved the above problem, see the setup function above.
Static
test3_With serial collision handling, the center ball remains motionless, and the two balls exchange velocity.
Static
test4_Static
test4_Static
test5_true gives round balls, false gives square blocks
Static
test5_'one hits two on wall': two balls (or blocks) are in stationary contact with a wall (infinite mass); a third ball collides into them from the left; the result is usually that the ball just bounces off and the two balls stay in stationary contact. The exception is when using serial collision handling and square blocks instead of round balls (because then the two corner collisions on the blocks are handled serially instead of simultaneously). Because this test involves resting contacts, we must use ContactSim.
true gives round balls, false gives square blocks
Static
test6_Serial collision handling case: non-symmetric result.
Static
test6_Simultaneous collision handling case: symmetric result.
Static
test7_Simultaneous collision handling case. Note (March 30 2011): This failed with ContactSim.VELOCITY_TOL = 0.5, so I lowered VELOCITY_TOL to 0.05. The problem was that energy was increasing after the collision; the cause was that a contact was being detected that had a relatively high velocity of 0.28, and a contact force was acting there (and because work = force * distance, there was energy being added as the contact was separating).
Static
test7_Hybrid collision handling case.
Static
test7_Serial collision handling case.
Static
test8_Static
test8_Static
test8_Static
test8_Static
test8_Static
two_'Two hits one asymmetric': Two balls approach a central stationary ball so that the collisions happen at the same moment; the balls have different velocities. The result should be that the central ball should remain motionless and the moving balls bounce off but exchange velocities. Because there are no static contacts, but only two dynamic collisions, we can use ImpulseSim here (don't need to use ContactSim).
Static
two_Static
two_Two balls are inside a rectangular frame. One ball is given a rightward initial velocity. This causes an infinite series of collisions, but certain settings for the collision handling can cope with this problem. See Physics Based Animation by Erleben, et. al. Chapter 6-2 'Multiple Points of Collision'.
Generated using TypeDoc
Unit tests of ImpulseSim, for cases involving multiple simultaneous collisions.
Note that these tests are sensitive to the settings for
VELOCITY_TOL
andDISTANCE_TOL
in ImpulseSim.