The problem related to shape below. I need to find a parametric equation curve that is split into four different equations depending on the range. How can piecewise equations be combined into a single equation. Is there a way for that?
$$f(t)= \begin{cases} \langle r_1\cos(t),r_1\sin(t)\rangle & -s\leq t \leq s\\ \langle r_2\cos(t),r_2\sin(t)\rangle & -s\leq t \leq s\\ \langle d\cos(t+s)+m\cos(s),d\sin(t+s)+m\sin(s)\rangle & 0\leq t \leq \pi\\ \langle d\cos(t-s)+m\cos(-s),d\sin(t-s)+m\sin(-s)\rangle & \pi\leq t \leq 2\pi\\ \end{cases}$$ Where $s$ is length of arc, $r_1<r_2,\quad d=\frac{r_2-r_1}{2},\quad m=\frac{r_1+r_2}{2}$.
