So I've been working on a game for three months -some kind of air hockey- and players play in fields with various shapes in a two-dimensional plane. Recently, I wanted to make one of these fields looking like an epicycloid, the one with four "petals".
.
When I create a field, I have to get its shape's parametric equation to draw it, and its shape's cartesian equation for everything about the game's physics.
By definition, an epicycloid is a plane curve produced by tracing the path of a chosen point on the circumference of a circle which rolls without slipping around a fixed circle.
The parametric representation of an epicycloid centered in $A(a, b)$, with the static circle of radius $R$ and the moving one of radius $r$ is :
$$x = a + m\left((R + r)\cos(t) - r\cos\left(\frac {R + r}{r}t\right)\right)$$ $$y = b + m\left((R + r)\sin(t) - r\sin\left(\frac {R + r}{r}t\right)\right)$$ where $m$ is a constant. According to the value of $\frac{R}{r}$, we have $\frac{R}{r}$ "petals".
Using this, I can draw the field, but I couldn't find a cartesian equation for a "four petal" epicycloid, so I can't work on the field's physics. Can anyone help me find a cartesian equation ?
In Macaulay2
$$x^{10}+5x^8y^2+10x^6y^4+10x^4y^6+5x^2y^8+y^{10}\\-30x^8-120x^6y^2-180x^4y^4-120x^2y^6-30y^8\\-15x^6-45x^4y^2-45x^2y^4-15y^6\\+5840x^4-38320x^2y^2+5840y^4\\-11520x^2-11520y^2\\-331776=0$$