0

Here is the figure I want to draw:

The circle]1

I want it to be a circle not as the bottom cut in the picture, I want its color to be sierra blue please?

Could someone help me in doing so? I know how to draw a circle with adjacent circles inside it, but not disjoint circles.

7
  • "but not disjoint circles" >>> choose relevant coordinates for the centers and choose a smaller radius
    – Black Mild
    Feb 19, 2022 at 5:33
  • \documentclass[tikz,border=5mm]{standalone} \begin{document} \begin{tikzpicture} \draw[fill=red] (0,0) circle(2); \draw[fill=white] (1,0) circle(.5) (-1,0) circle(.5); \end{tikzpicture} \end{document}
    – Black Mild
    Feb 19, 2022 at 5:36
  • @BlackMild what about the arrows in my figure? and the labels?
    – Mathstupid
    Feb 19, 2022 at 5:40
  • you did not ask about arrows in your question!
    – Black Mild
    Feb 19, 2022 at 5:42
  • I meant the drawing of the whole figure, sorry about that, should I edit my question?@BlackMild
    – Mathstupid
    Feb 19, 2022 at 5:49

2 Answers 2

6

So the main difficulty is arrows. I define a style myarrow with a parameter indicating arrow's position.

enter image description here

\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}
\tikzset{myarrow/.style={postaction={decorate},
        decoration={markings,% switch on markings
            mark=at position #1 with {\arrow{>}},
}}} 
\tikzset{dot/.style={circle,fill,inner sep=1pt}}
\def\R{2.5}
\def\r{.5}

\draw[fill=yellow!50,myarrow=.6] (\R,0) arc(0:-360:\R) node[pos=.6,left]{$a$};
\draw[fill=white,myarrow=.6] (\R/2+\r,0) arc(0:-360:\r) node[pos=.6,left]{$a$};
\draw[fill=white,myarrow=.6] (-\R/2+\r,0) arc(0:-360:\r) node[pos=.6,left]{$a$};
\path
(0,\R)     node[dot] (x)  {} node[above] {$x$}
(\R/2,\r)  node[dot] (xR) {} node[above right]{$x$}
(-\R/2,\r) node[dot] (xL) {} node[above left]{$x$}
;
\draw[myarrow=.6] (x)--(xL) node[pos=.6,left]{$b$};
\draw[myarrow=.6] (x)--(xR) node[pos=.6,right]{$c$};
\path (0,-\R/2) node{$U$};
\end{tikzpicture}
\end{document}

You can change to another arrows as ones described in the arrows.meta library (see pgfmanual).

2

A small variation od nice @Black Mild answer (+1):

\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{arrows.meta,
                decorations.markings,
                quotes}

\begin{document}
    \begin{tikzpicture}[
         > = Straight Barb,
->-/.style = {decoration={markings,% switch on markings
              mark=at position 0.4 with {\arrowreversed{>};
                                         \node[label=left:$#1$]{}; }
                         },
              draw, postaction={decorate},
              },
->-/.default = a,
dot/.style = {circle,fill,inner sep=1.2pt, outer sep=0pt,
              node contents={}},
every edge/.style = {pos=0.4,->-={}},
every edge quotes/.style = {auto, inner sep=2pt},
every label/.style = {inner sep=1pt}
                        ]
\def\R{2.5cm}
\def\r{.5cm}
\draw[->-,fill=cyan]  (0,0)     circle[radius=\R];
\draw[->-,fill=white] (-\R/2,0) circle[radius=\r];
\draw[->-,fill=white] ( \R/2,0) circle[radius=\r];
\path   (0,\R)      node (x)  [dot,label=$x$]
        ( \R/2,\r)  node (xR) [dot,label= 75:$x$]
        (-\R/2,\r)  node (xL) [dot,label=105:$x$];
\draw   (xL) edge["$b$"]   (x)
        (xR) edge["$c$" '] (x) 
        (0,-\R/2) node{$U$};
    \end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .