maxDev = 10; // Max deviation in pixelss
pd = 30; // Base speed of oscillation
duration = 2; // Duration in seconds
t = time - inPoint;
decay = Math.log(100) / duration;
if (t < duration) {
x = scale[0] + maxDev * Math.sin(spd * t) / Math.exp(decay * t);
y = (scale[0] * scale[1]) / x;
[x, y]; }
else {
scale;}