This works better in turbowarp: https://turbowarp.org/460979685/ Turn on turbo mode and high quality pen and disable the compiler. At the very least turn on turbo mode by holding shift and clicking the green flag. Try out different parameters and see what behaviors you get! (Click the green flag again for new parameters to take effect) The red graph represents position and the green graph represents velocity. Use turbo mode to make the graph not flicker. This simulation models a system containing a mass and a spring. Two forces act on the mass: a spring force proportional to the block's distance from the center, and a damping force proportional to the speed of the block. This system can be: Undamped: there is no damping force, and the block will oscillate forever. Underdamped: The block will oscillate but will eventually stop at the center point. Overdamped: The block will not oscillate. Critically damped: The damping constant is *just* high enough to prevent the block from oscillating. This simulation works by modeling the block's position with the ode x'' + bx' + kx = 0. (x represents the block's position at time t, x' its velocity and x'' its acceleration). Then, this ODE is solved, giving a formula to determine the block's *exact* position and velocity at any point in time.