I want to make concentric circle segments in a line between two nodes A and B, with the center of the segments in A. The segments should have the same height (when possible). My code so far:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
%%% extract coordinate
\newdimen\XCoord
\newdimen\YCoord
\newcommand*{\ExtractCoordinate}[1]{\path (#1); \pgfgetlastxy{\XCoord}{\YCoord};}%
\begin{document}
\begin{tikzpicture}
\def \h{30};
\def \lw {2};
\node[circle, fill] at (0,0) (A) {};
\node[circle, fill] at (8,0) (B) {};
% circle segments
\foreach \x in {1,3,...,9}{
\coordinate (x) at ($(A)!\x/10!(B)$);
%%% find theta and radius
\ExtractCoordinate{x};
\def \ang {atan(\h/\XCoord)};
\def \r {\XCoord};
%%% draw arcs
\draw[line width = \lw, red] (x) arc(0:\ang:\r);
\draw[line width = \lw,red] (x) arc(0:-\ang:\r);
};
\end{tikzpicture}
\end{document}
This is just a special case. How can I make it more general, i.e. no restrictions on the placement of A and B?





