I am using the following code to illustrate double angle theorem and although it works some of the time, I world like a method to define the random numbers so it always takes the form, as shown in the screen shot.
\documentclass[border=3.141592=12mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
positioning,
quotes}
\usetikzlibrary {angles,quotes}
\usetikzlibrary{calc,positioning}
\pgfmathsetseed{\pdfuniformdeviate 10000000}
\begin{document}
\begin{tikzpicture}[
trig format=rad,
dot/.style = {circle, fill, inner sep=1pt, outer sep=0pt},
ang/.style = {draw=red, <->,
angle radius = 3mm,
angle eccentricity=1.2,
}
]
\pgfmathsetmacro{\r}{2}
\pgfmathsetmacro{\R}{\r+0.3}
% circle
\draw (0,0) coordinate (O) circle[radius=\r];
% triangles' corners coordinates and labels
\foreach \c/\l in {rand/A, rand/B, rand/C} % define random coefficients
% for calculations of triangle's
% corners coordinates on circle
% and define corners names
{
\pgfmathsetmacro{\C}{2*pi*\c} % calculate triangle coordinates
\node (\l) [dot] at (\C:\r) {}; % draw dots at triangle corners
% \draw[-Stealth, gray, very thin] % draw arrows from circle center
% to triangle's corners,
% if not needed, just delete this line
(0,0) -- (\l);
\path (\l) -- (\C:\R) node {\l}; % define corners labels coordinates,
% they are in direction of vector
% from circle origin to dot node
}
% triangle
\draw[cyan]
(B) -- (O); % draw trangle
\draw[cyan]
(C) -- (O);
\draw[cyan]
(C) -- (A);
\draw[cyan]
(A) -- (B);
\draw (B) -- (O) -- (C)
pic [draw=green!50!black, fill=green!5, angle radius=4mm,
"$\theta$"] {angle = B--O--C};
\draw (B) -- (A) -- (C)
pic [draw=green!50!black, fill=green!5, angle radius=4mm,
"$\theta$"] {angle = B--A--C};
\end{tikzpicture}
\end{document}
rand
here\foreach \c/\l in {rand/A, rand/B, rand/C}
and not simply\pgfmathsetmacro{\C}{2*pi*rand}
? But it seems, that it works every run, if you settrig format=deg
(default) and then\pgfmathsetmacro{\C}{360*rand}