Play around! click and drag the nodes and see how the shape reacts! Change the physics to see how it responds! Feel free to remix and make your own shapes!
Each node checks the links, and applies force to itself for the ones that match it. The math is complicated and the iterating portion tends to fail when modified even slightly.