# Spring Cube

**+**

This program simulates a block of jello by discretizing into a grid of $16\times 16\times 16$ vertices, connected together by springs in the following configuration:

- Each vertex is connected to its nearest neighbors along gridlines
- Each vertex is connected to those which lie adjacent across the diagonal of a square or cube
- Each vertex is also connected along gridlines to vertices at distance 2 away.

Altogether this is a lot of springs! Giving each spring the potential energy $V=\tfrac{1}{2}k(x-\Delta)^2$, where $\Delta$ is the rest length of the given spring when the cube is a rigid Euclidean cube, we simulate the physics using Newtonian mechanics of these (thousands!) of coupled harmonic oscillators.

To deal with numerical instability and add realism, we further incorporate dissipation into the model, adding a spring drag force which is proportional to the difference in velocity between the two masses at the end of a given spring.

Right now the simulation is not very interactive (it was just a proof of concept) though you can reset the initial condition by clicking the menu button. Check back in the future for more excitement!

**+**