I am trying to draw a hexagon that is connected to a set of vertices and edges within the borders of the hexagon itself. It is similar to a Grötzsch graph but is a hexagon rather than a pentagon.
So far I have this code that I found from others creating a Grötzsch graph. I tried to create it with 6 vertices.
This is the photo I'm trying to create using tikz:
This is the code I have right now but I'm stuck on the middle of the hexagon. I got this code from another post answer on here that I hardly changed at all but pointed me in the right direction (https://tex.stackexchange.com/a/674043/283535)
\begin{tikzpicture}
\node[thick,regular polygon,regular polygon sides=6, minimum size=7cm,draw] (poli) at (0,0) {};
\coordinate (v1) at (poli.corner 2);
\coordinate (v2) at (poli.corner 3);
\coordinate (v3) at (poli.corner 4);
\coordinate (v4) at (poli.corner 5);
\coordinate (v5) at (poli.corner 1);
\coordinate (v6) at (poli.corner 6);
\filldraw (v1) node[left]{$v_1$} circle (2pt);
\filldraw (v2) node[left]{$v_2$} circle (2pt);
\filldraw (v3) node[right]{$v_3$} circle (2pt);
\filldraw (v4) node[right]{$v_4$} circle (2pt);
\filldraw (v5) node[above]{$v_5$} circle (2pt);
\filldraw (v6) node[right]{$v_6$} circle (2pt);
\draw (v1) -- (v3)
(v1) -- (v4)
(v2) -- (v4)
(v2) -- (v5)
(v3) -- (v5);
\coordinate (u1) at ($0.5*(v2)+0.5*(v5)$);
\coordinate (u2) at ($0.5*(v1)+0.5*(v3)$);
\coordinate (u3) at ($0.5*(v2)+0.5*(v4)$);
\coordinate (u4) at ($0.5*(v3)+0.5*(v5)$);
\coordinate (u5) at ($0.5*(v1)+0.5*(v4)$);
\coordinate (w) at (poli.center);
\filldraw (u1) node[left]{$u_1$} circle (2pt);
\filldraw (u2) node[left]{$u_2$} circle (2pt);
\filldraw (u3) node[right]{$u_3$} circle (2pt);
\filldraw (u4) node[right]{$u_4$} circle (2pt);
\filldraw (u5) node[above]{$u_5$} circle (2pt);
\filldraw (w) node[right]{$w$} circle (2pt);
\draw (u1) -- (w)
(u2) -- (w)
(u3) -- (w)
(u4) -- (w)
(u5) -- (w);
\end{tikzpicture}
I changed the polygon and the vertices. I am now trying to connect them to the new set of vertices (u_1, ..., u_6) but they are showing up strange for me at the moment.
Thank you for any and all help!
\coordinate (u4) at ($0.5*(v3)+0.5*(v6)$); \coordinate (u5) at ($0.5*(v4)+0.5*(v5)$);
.