Hypotrochoid Curve with Additional Scrollbars

240
40
1
150
1
1
Basically the core of the curves is implemented with the following formula (notice the number lobes is characteristics of the "f2/f1" in the formula.   If you change f2 or f1, then you get the corresponding number of lobes.:

        for (let t = 0; t <= period; t += 0.01) {
            const x = (R - r) * Math.cos(f1*t) * (r1 + Math.cos(f2*t)) + d * Math.cos(((R - r) / r) * t);
            const y = (R - r) * Math.sin(f1*t) * (r1 + Math.cos(f2*t)) - d * Math.sin(((R - r) / r) * t);
        }