Skip to main content

Soft Sphere

Soft Sphere is an example of a physical system of N balls that fall because of the force of gravity and then can bounce when they hit the ground. Animation is provided to see the evolution of the system. Soft Sphere is a tensor based example of a N balls in a N x D tensor, where D is the dimension and set to two. This is an example of solving a differential equation using the Euler method, where an energy function is automatically differentiated to yield the acceleration of the balls for the ODE equations. This example demonstrates taking the derivative of a function over a set of variables contained in a tensor.

Open Example In Github