How to draw all (or some) symmetries axes of a regular polygon

You can use center and side anchors with corner anchor for a polygon.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, calc}

\begin{document}

\begin{tikzpicture}[scale=3]
\def\rps{7} % regular polygon sides
\node (a) 
[draw,  blue!0!black,rotate=90,minimum size=3cm,regular polygon, regular polygon sides=\rps] at (0, 0) {}; 

\foreach \x in {1,2,...,\rps}
  \fill (a.corner \x) circle[radius=.5pt];
  \foreach \x in {1,2,...,\rps}{
  \draw [red,dashed, shorten <=-0.5cm,shorten >=-0.5cm](a.center) -- (a.side \x);
  \draw [red,dashed, shorten <=-0.5cm,shorten >=-0.5cm](a.center) -- (a.corner \x);}

\end{tikzpicture}
\end{document} 

For n=3

enter image description here

For n=4

enter image description here

For n=7

enter image description here


\documentclass[pstricks,preview,border=5mm]{standalone}
\usepackage{pst-node,pst-plot}

\def\N{10}
\degrees[\N]

\begin{document}
\makeatletter
\begin{pspicture}(-4,-4)(4,4)
    \pstVerb{/offset 30 def}%
    \curvepnodes[plotpoints=\numexpr\N+1\relax]{0}{\N}{3 t \pst@angleunit offset add PtoC}{A}
    \psnline[showpoints](0,\N){A}
    \multido{\i=0+1}{\N}{\pcline[nodesepB=-10mm,linestyle=dashed,linecolor=red](0,0)(A\i)}
\end{pspicture}
\makeatother
\end{document}

enter image description here

Tags:

Draw

Tikz Pgf