It has always bothered me that it's so hard to draw TikZ arcs by specifying the centre of the arc. Then I thought I have a good workaround by using the TikZ library math. Let's use it to draw an arc with center at the origin, and then put a dot at the origin.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{math}
\begin{document}
\begin{tikzpicture}
\tikzmath{
\angle = 90;
\radius = 1;
}
\draw
( canvas polar cs:
radius = \radius
, angle = \angle
)
arc
[ radius = \radius
, start angle = \angle
, end angle = 4*\angle
];
\node[circle,fill] {};
\end{tikzpicture}
\end{document}
This way I'm jumping to the start position of the arc using the polar coordinate system. \tikzmath allows me to reuse the lengths so I can specify exactly the same radius when I draw the arc (so when I fiddle around with radius values, I only need to do so in one point).
Clever, heh? Except it doesn't work:
It starts drawing at the origin although I specified the correct coordinates! What's going on? Maybe a dimension problem?
\radius = 1cm;
That blows up the picture completely. Is my approach doomed? Note, that this works, though:
\tikzmath{
\angle = 90;
}
\draw
( canvas polar cs:
radius = 1cm
, angle = \angle
)
arc
[ radius = 1
, start angle = \angle
, end angle = 4*\angle
];
\node[circle,fill] {};
Ok, that's the right picture, but the code is silly! I don't want to enter every radius in my thousand pictures once with cm and once without! What do I do?





\draw (\angle:\radius) ...it works. But I am still struggling to understand what you want to achieve. – Feb 15 '18 at 14:40