How can I great hexagon that its' sides is a loci of an equation?
I have no idea what you are asking. If you are asking if there exist an "equation" such that the set of all points that satisfy the equation form a hexagon then the answer is "yes" if you allow that equation to have 6 separate parts, giving each if the six sides of the hexagon.
$$f:[0,1] \to \mathbb{R}^2$$
defined by:
$$f(t) = \begin{cases}6t\begin{pmatrix}0 \\ 1\end{pmatrix}, & 0 \le t < \dfrac{1}{6} \\ (2-6t)\begin{pmatrix}0 \\ 1\end{pmatrix} + (6t-1)\begin{pmatrix}1 \\ 2\end{pmatrix}, & \dfrac{1}{6} \le t < \dfrac{1}{3} \\ (3-6t)\begin{pmatrix}1 \\ 2\end{pmatrix} + (6t-2)\begin{pmatrix}2 \\ 2\end{pmatrix}, & \dfrac{1}{3}\le t < \dfrac{1}{2} \\ (4-6t)\begin{pmatrix}2 \\ 2\end{pmatrix} + (6t-3)\begin{pmatrix}3 \\ 1\end{pmatrix}, & \dfrac{1}{2} \le t < \dfrac{2}{3} \\ (5-6t)\begin{pmatrix}3 \\ 1\end{pmatrix} + (6t-4)\begin{pmatrix}3 \\ 0\end{pmatrix}, & \dfrac{2}{3}\le t < \dfrac{5}{6} \\ (6-6t)\begin{pmatrix}3 \\ 0\end{pmatrix}, & \dfrac{5}{6} \le t \le 1\end{cases}$$