By Jesus Sosa
From physics, we know the basic motion of a pendulum, the primary mechanism in the harmonograph machine, is sinusoidal.
Both the x-axis and y-axis motion is delivered by pendulums, which means the basic equation for motion along each axis is a sinusoid.
When you add in the rotation of the drawing surface, you introduce one more sinusoid for both the x-axis and y-axis motion.
Because this is a real-world machine, there is inherently friction in the motion of the pendulums;
hence, the pendulum swinging decays to zero over the progression of time - this is the damping factor.
x(t)=a1*sin(t*f1+p1)*Math.exp(-1*d1*t) + a2*sin(t*f2+p2)*Math.exp(-1*d2*t);
y(t)=a3*sin(t*f3+p3)*Math.exp(-1*d3*t) + a4*sin(t*f4+p4)*Math.exp(-1*d4*t);
Based on the article: