Basically, I wanted to create an illustration similar to the bottom rod of this plot:
Following the answers here and here, below is the code for my best attempts. There are two issues:
- In both attempts, the shift to the left doesn't work as intended. I expected the 1st arc to end at 2*4cm diameter = (8cm, 0), then shift -2cm -> (6cm, 0), then the 2nd arc to end at 6cm-2*2cm diameter = (2cm, 0)
- I want the color gradient to propogate radially, rather than just from top to bottom.
Code:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\shade[thin, draw=black, top color=blue,bottom color=red]
(0cm,0cm) arc (0:180:4cm) -- +(-2cm,0) arc (180:0:2cm) -- cycle;
\shade[thin, draw=black, top color=blue,bottom color=red]
(0cm,0cm) arc (0:180:4cm) coordinate (a) -- ([xshift=-2cm]a) arc (180:0:2cm) -- cycle;
\end{tikzpicture}
\begin{document}







\clipof circles. see final edit of answer. – Zarko Aug 12 '18 at 21:15