This demo simulates a Harmonograph (see also Lissajous curve), a device that traces the motion of a swinging pendulum, based on the following equations:

X frequency

Y frequency

X phase

Y phase

X amplitude

Y amplitude

X damping

Y damping

Draw from cycle...

... to cycle

Points per cycle

*Animate whatever parameters you want in the code under function AnimateParameters()*

x = sin( phase_{x} + cycle * frequency_{x} ) * amplitude_{x} * (1-damping_{x})^{cycle}

y = sin( phase_{y} + cycle * frequency_{y} ) * amplitude_{y} * (1-damping_{y})^{cycle}

y = sin( phase

X frequency