I initially started with 6 separate equations in a hybrid function to plot the hexagon, but then I managed to reduce it to 3 (mistakes are here)
$$y^2=\sqrt{3}\left(x-r\right)^2\ \left\{x<r\right\}$$ $$y^2=\sqrt{3}\left(x+r\right)^2\ \left\{x>-r\right\}$$ $$y^2=r^2$$
All I want to know is if there exists a single equation which plots a regular hexagon about the centre,
and the mistakes I have made with this solution
Since I'm a newbie,a bit of help on how to reword this question to make it more specific would be appreciated.
EDIT: I would like to keep the main focus on the hexagon only, i am not interested in the other regular polygons, for simplicity of the problem and for a more detailed answer
Also answer should be expressed as equation relating y and x, not in polar form or parametric