// initialize nodes
for each node, n
initialize force: either clear it (n.f = 0) or
initialize with global forces such as wind
// compute the force due to the spring and add it to the attached nodes
for each spring, s
f = F(s)
n1.f += f
n2.f += -f
// move the nodes
for each node, n
a = A(n.f,n.m)
if gravity, add gravitational acceleration to a
n.v = V(n.v,a,dt)
n.p = P(n.p,n.v,dt)
display mesh