Hook's Law f=−k(x−x0)\mathbf{f}=-k\left(\mathbf{x}-\mathbf{x}_0\right)f=−k(x−x0) fff is the force acting on a node kkk is the stiffness x0x_0x0 is natural length Force acting on particles: f12=−k∥(x1−x2)∥(x1−x2)∥x1−x2∥f21=−f12\begin{aligned} &\mathbf{f}_{12}=-k\left\|\left(\mathbf{x}_1-\mathbf{x}_2\right)\right\| \frac{\left(\mathbf{x}_1-\mathbf{x}_2\right)}{\left\|\mathbf{x}_1-\mathbf{x}_2\right\|} \\ &\mathbf{f}_{21}=-\mathbf{f}_{12} \end{aligned}f12=−k∥(x1−x2)∥∥x1−x2∥(x1−x2)f21=−f12