[Tex/LaTex] Draw Vertices of Regular Polygon

asymptotediagramspstrickstikz-pgf

I am trying to draw just the nodes (no sides) at the vertices of a regular hexagon. This answer should be easily modified to accomplish what I want, but I am such a novice that I have difficulty understanding the example. Ideally, each vertex would be a separate named node so that I can easily draw edges between them (I will be making several different graphs using these same nodes).

Best Answer

You can use the regular polygon shape from the shapes.geometric library, setting draw=none. Giving the node the name a, the vertices will be named a.corner 1, a.corner 2 etc.

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\begin{document}

\begin{tikzpicture}
% create the node
\node[draw=none,minimum size=2cm,regular polygon,regular polygon sides=6] (a) {};

% draw a black dot in each vertex
\foreach \x in {1,2,...,6}
  \fill (a.corner \x) circle[radius=2pt];

\end{tikzpicture}
\end{document}
Related Question