Cloth simulation 3 - collision with spheres
1,973 views · Published 20 September 2010 · 1:34 · Indexed 11 October 2026
Channel: Paul Nathan · 2010 · Science & Technology
Same code as video 2 but now with sphere-sphere collision modelling in the loop. Newton's 2nd and 3rd law are used to provide an expression for conservation of momentum between a pair of colliding spheres. Conservation of kinetic energy provides the second equation from which the velocities of the spheres after impact can be found. The induced acceleration of the spheres (via Newton's 2nd law) is calculated and used to move them. Next improvement will be to use the collision time to prevent intersection of spheres which can cause sticking. At the moment only a simple check on the distance between the sphere centres is employed. The collision time allows the simulation to be advanced to the exact point in time of impact. This has to be done in such a way that the time step per rendered frame remains constant (for the purposes of constant framerate animation)..... All coded from scratch using Visual Basic .NET.