In engineering and physics, a spring system or spring network is a model of physics described as a graph with a position at each vertex and a spring of given stiffness and length along each edge. This generalizes Hooke's law to higher dimensions. This simple model can be used to solve the pose of static systems from crystal lattice to springs. A spring system can be thought of as the simplest case of the finite element method for solving problems in statics. Assuming linear springs and small deformation (or restricting to one-dimensional motion) a spring system can be cast as a (possibly overdetermined) system of linear equations or equivalently as an energy minimization problem.
If the nominal lengths, L, of the springs are known to be 1 and 2 units respectively, then the system can be solved as follows:Consider the simple case of three nodes connected by two springs. Then the stretching of the two springs is given as a function of the positions of the nodes by
\DeltaL=\begin{bmatrix}1&-1&0\ 0&1&-1\end{bmatrix}x-L=B\topx-L
B\top
B=\begin{bmatrix}1&0\ -1&1\ 0&-1\end{bmatrix},
Fsprings=-W\DeltaL=-W(B\topx-L)=-WB\topx+WL
B
Fnodes=-BWB\topx+BWL=0
BWB\topx=BWL
BWB\top
x1=2
As an example, let W be the identity matrix then
BWB\top=\begin{bmatrix}1&-1&0\ -1&2&-1\ 0&-1&1\end{bmatrix}
x1=2
BWB\topx=\begin{bmatrix}1&-1&0\ -1&2&-1\ 0&-1&1\end{bmatrix}\begin{bmatrix}2\ x2\ x3\end{bmatrix}=BWL=\begin{bmatrix}-1\\-1\\2\end{bmatrix}
\begin{bmatrix}2\\-2\\0\end{bmatrix}+\begin{bmatrix}-1&0\ 2&-1\ -1&1\end{bmatrix}\begin{bmatrix}x2\ x3\end{bmatrix}=\begin{bmatrix}-1\\-1\\2\end{bmatrix}
\begin{bmatrix}-2\\0\end{bmatrix}+\begin{bmatrix}2&-1\ -1&1\end{bmatrix}\begin{bmatrix}x2\ x3\end{bmatrix}=\begin{bmatrix}-1\\2\end{bmatrix}
\begin{bmatrix}2&-1\ -1&1\end{bmatrix}\begin{bmatrix}x2\ x3\end{bmatrix}=\begin{bmatrix}1\\2\end{bmatrix}
\begin{bmatrix}x2\ x3\end{bmatrix}=\begin{bmatrix}2&-1\ -1&1\end{bmatrix}-1\begin{bmatrix}1\\2\end{bmatrix}=\begin{bmatrix}3\\5\end{bmatrix}
x1=2
x2=3
x3=5