update = (theta, dtheta) => {
let { mass1, radius1, mass2, radius2 } = options,
omega = computeOmega(theta),
r = radius2 * Math.sin(theta),
kineticEnergy =
0.5 * mass2 * Math.pow(r * omega, 2) +
0.5 * mass1 * Math.pow(radius1 * omega, 2),
a = r * r * omega,
dr = Math.cos(theta) * a * dt;
dtheta += dr / radius2;
theta += dtheta;
return { omega, theta, dtheta, kineticEnergy };
}