ping pong — live canvas animation example

motion & easing8+
trig, angles & vectors8+
collision detection11+
numbers in motion7-
geometry & shapes8+
generative showpieces13+
handy helpers7+

pingPong bounces one number back and forth between 0 and a peak — a triangle wave. The bar on the left is that number; the dot on the right is something using it. Watch them slide out and back, forever, with no jump.