LaTeX usually has several ways to do a problem. The simplest way is often times through using a package which does a lot of the work for you. The documentation for tkz-berge
is here; it has the Wheel graph built in (see page 40), so coding is easier. I've added rotate
to the options to allow you to rotate the graph by changing 90 to something else. Once you find the look that you want, Changing \grWheel[RA=15]{7}
to \grWheel[RA=15]{6}
will get you your other graph, no calculations required. You might want to rotate
it to get it to look like you want.
\documentclass[11pt,border=12mm]{standalone}
\usepackage{tkz-berge}
\begin{document}
\begin{tikzpicture}[scale=.8,rotate=90]
\GraphInit[vstyle=Shade]
\grWheel[RA=4,prefix=]{7}
\end{tikzpicture}
\end{document}
The code, running in Gummi gives:

The documentation of tkz-berge
shows you how to change the style of the vertices, edges, put labels in vertices or outside vertices, etc. The border
option in the first line of code can be increased if the picture is too big that part of it gets cut off.
EDIT: I should mention that tkz-graph
documentation, here by the same package author explains more about the commands. Changing my code through \GraphInit[vstyle=Normal]
gives a more standard graph drawing.
\documentclass[11pt,border=12mm]{standalone}
\usepackage{tkz-berge}
\begin{document}
\begin{tikzpicture}[scale=.8,rotate=90]
\GraphInit[vstyle=Normal]
\grWheel[RA=3,prefix=]{7}
\end{tikzpicture}
\end{document}

tikz-pgf
, I do not know, what you use).(360*k/n:2)
, wheren
is the number of spokes andk
is the spoke number. Note the syntax for polar coordinates is(θ:r)
.