Set up the carts, then launch. Watch how motion transfers from one cart to the other.
Physics behind the simulation
For elastic collisions, v′A = [(mA − mB)vA + 2mBvB] / (mA + mB), with the corresponding expression for B. For perfectly inelastic collisions both carts move together at (mAvA + mBvB) / (mA + mB). Total momentum is signed; kinetic energy is ½mv² summed over both carts.
The magnetic bumpers model a perfectly elastic interaction; hook-and-loop pads model sticking. Real equipment has rolling resistance and some energy loss. The collision is instantaneous in this ideal model; vector lengths change immediately at impact. The run ends before end-stop contact.