Static
Private
ball_Static
ball_Ball collides with corner of a block, then they mutually attract each other and
collide and then have rolling rocking contact. Note this test activates the
HANDLE_COLLISION_FAIL condition in CollisionAdvance
This resulted in a STUCK condition on June 11 2015. The fix was to turn on binary search when stuck count > 1. After a bunch of rolling this simulation has the "too close" tiny distance condition (distance is around 0.0006). And then there is an unresolveable collision because the pre-collision velocity is positive and tiny (0.00023). Binary search fails to find a before/after collision with negative velocity in the before state that can be corrected.
I'm pretty sure what's going on is this: We take two smaller steps during the binary search which results in no actual collision being found; we gain better accuracy from the small steps, the contact forces are calculated more frequently and so we correctly maintain the tiny distance of 0.0006 to the next step. Turning on binary search thus lets us get past this point, though it doesn't fix the tiny distance.
Static
Private
ball_Static
ball_Ball collides with corner of a block.
Static
Private
ball_Static
ball_Ball and block start in contact and in motion, with mutual gravitation. Ball has offset center of mass. Energy should be constant with a small enough time step.
Static
ball_A ball falls onto a flat infinite mass floor with elasticity < 1 so the bounces are successively smaller. Using ContactSim this results in a steady contact; but using ImpulseSim the number of bounces goes to infinity, the time between bounces goes to zero and the simulation gets stuck.
Static
ball_Static
Private
circle_Static
circle_A block collides into another block that has a circular arc edge, then they settle into rocking contact under mutual gravitation.
Static
Private
commonOptional
damping: numberStatic
Private
concave_Static
concave_Concave circular edge collides with a block, settles into rocking contact.
Static
Private
concave_Static
Private
concave_Static
concave_A body with a concave circle edge starts in contact with a square block, both bodies attracting each other by mutual gravitation, they start rocking. This test uses a unique approach for positioning the objects where we look at the collision/contact depth between the objects while iteratively setting the initial position until it is at a precise distance. The concave circle object is initially below the block. Each time in the loop we move the block from the origin, a distance of 1.5 to the current estimated location for the block. If no collision results, then we continue to increase the distance which moves the block lower. If a collision results, we reduce the distance by the depth of the collision plus the desired ending gap, and try again.
Static
elastic_Static
elastic_Several balls with varying elasticity bounce on floor.
Static
Private
rotating_Static
rotating_Static
Private
rotating_Static
rotating_Static
Private
rotating_A slowly rotating rectangle collides into a stationary circle, with no gravity. If midpoint vertex contacts are turned on then this test should fail; in that case a contact is falsely detected and a contact force changes the energy when the energy should be constant. Also this test should fail if RigidBodyCollision.updateCollision() is not being called for each collision.
Another interesting variant of this is to have the block move at higher velocity, and use a small time step (like 0.0025) and set time rate to be slow (0.1) to watch it occur.
body1.setVelocity(new Vector(-3, 0), 6);
Static
wedged_Static
wedged_A ball falls into the gap between a wall and a fixed block; the space is slightly smaller than the radius of the ball.
Generated using TypeDoc
Tests interactions between polygons with circular and straight edges.
Why are some of these tests using such small time steps??? to show energy conservation?
TO DO arc (partial circle) tests.