Draw Vertices of Regular Polygon
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}
Time to call \foreach
. Of course, it is possible to use a lot of other tools.
\documentclass[]{report}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach \a in {0,60,...,300} { %\a is the angle variable
\draw[fill] (\a:2cm) circle (1pt); % 2cm is the radius; 1pt is the radius of the small bullet
}
\end{tikzpicture}
\end{document}
Here are some other possible options, if you want to change colors.
\draw[line width=.7pt,blue,fill=yellow] (\a:1.5cm) circle (2pt);
Here is a PSTricks solution (with some extra features -- just remove the code not needed or outcomment it):
\documentclass{article}
\usepackage{
pst-poly,
pstricks-add
}
\usepackage[
% locale = DE,
round-mode = places,
round-precision = 2
]{siunitx}
\usepackage{xfp}
% calculations
\newcommand*\Angle{\fpeval{360/\sides}}
\newcommand*\sidelength{\fpeval{2*\radius*sin(pi/\sides)}}
\newcommand*\radiusI{\fpeval{\radius*cos(pi/\sides)}}
%\newcommand*\areaI{\fpeval{pi*\radiusI^2}}
%\newcommand*\areaC{\fpeval{pi*\radius^2}}
%\newcommand*\areaRatio{\fpeval{cos(pi/\sides)^2}}
\psset{dimen = m}
\begin{document}
% constants
\def\sides{6}
\def\radius{3.5}
\begin{center}
\begin{pspicture}(-\radius,-\radius)(\radius,\radius)
% centre
\pnode(0,0){C}
% regular polygon with dots at corners
\rput(C){%
\PstPolygon[
PolyNbSides = \sides,
unit = \radius
]
}
{\psset{linestyle = dashed}
% inscribed circle
\pscircle(C){\radiusI}
% circumscribed circle
\pscircle(C){\radius}}
% dots with labels at the corners and lines from the centre to the corners
\multido{\r = 0+\Angle, \i = 1+1}{\sides}{
\psRelLine[
angle = \r,
linestyle = dotted
](C)(\radius,0){1}{A}
\psdot[
linecolor = red
](\radius;\r)
\uput[\r](\radius;\r){$P_{\i}$}
}
% dot at centre
\psdot[
linecolor = blue!60
](C)
% label position
\pcline[
linestyle = none,
offset = 9pt
](C)(\radius,0)
% label
\ncput{$r = \num[round-mode = off]{\radius}$}
\end{pspicture}
\end{center}
\bigskip
\noindent
Regular $\sides$-gon with side length~$s = \num{\sidelength}$.
\end{document}