2

I would like to be able to draw lines (edges) between any two vertices within this circle of 10 vertices. I have been able to draw the vertices in the circle but I can't figure out how to draw the edges.

This is what I currently have:

\usepackage{tikz}
\usetikzlibrary{shapes.geometric, positioning, calc}
\tikzset{%
    mynode/.style={%
        circle, radius=2pt, draw=darkgray, fill=white
    }
}

\begin{tikzpicture} \node[minimum size=4cm, regular polygon, regular polygon sides=10, rotate=180] (epta) {}; \foreach \x in {1,2,...,10}{% \node[mynode] at (epta.corner \x) (e\x) {};} \end{tikzpicture}

If there are any suggestions on a better way to draw a graph with nodes and edges, please let me know. I am new to drawing on LaTeX so I don't know the best way.

enter image description here

  • 1
    You have already named all edged, so draw from one to the other, like draw (e1) -- (e2); – Harald Lichtenstein Sep 16 '20 at 17:37
  • Add draw option to node definition, like: \node[draw, minimum size=4cm, regular polygon, regular polygon sides=10, rotate=180] (epta) {}; –  Sep 16 '20 at 18:05

0 Answers0