Move the mouse around to affect the bob. Press space to hide/show arrows.
A spring simulation using Hooke's law where the force that a spring applies to an object is proportional to the object's displacement from the spring's resting length. F = k * d The orange arrow represents the spring force, the blue arrow is the force of gravity, and the green arrow is the velocity vector. Known bugs: orange arrow doesn't point exactly toward mouse; suggestions welcome :)