# How to draw a ring-like diagram with some labels on its arcs?

I would like to draw a figure that looks like the following scenario:

Consider a circle of radius $r$, described parametrically by $x = cos(t) and y = sin(t)$. I'd like to draw a figure where the 90 to 180 degrees arc and the 270 to 360 arc are stretched by adding 1 to the previous point, while keeping the figure connected. Here is a sketch of the figure below: (x and y axis should not be included in the final figure). The respective labels are $\Omega_1$, $\partial \varphi(1)$, $\partial \varphi (1)$, $t=0$, $t=1$, $t=0$, $t=1$, $\phi^2$, $\Omega_2$

Any help would be greatly appreciated.

Here is part of the picture that I have drawn:

\begin{pspicture}(-.5,-.5)(3.5,3.5)
\psaxes[labels=none,ticks=none]{->}(0,0)(-.5,-.5)(3,3)[$x$,0][$y$,90]
\pscustom[fillstyle=solid,fillcolor=lightgray]
{
\psarc(0,0){2.5}{0}{90}
\psarcn(0,0){1.5}{90}{0}
\closepath
}
\rput(2;45){$\Delta \mathfrak{M}$}
\end{pspicture}


I'd also like to have an additional label $\Delta \mathfrak{M}$ in each annulus as well as for them to be shaded.

• It'd be swell if you could show us something that you have tried so far- perhaps Draw arc in tikz when center of circle is specified might help to get you started... Nov 10, 2013 at 0:52
• @cmhughes I understand how to draw arcs, but not how to connect them, nor how to label them properly Nov 10, 2013 at 0:55
• so are you drawing an annulus, perhaps like this: How to shade a partial annulus Nov 10, 2013 at 0:56
• @cmhughes it would be two annulus shapes and two arcs, along with the labels Nov 10, 2013 at 1:05

\documentclass[tikz,margin=10pt]{standalone}
\usepackage{mathtools,amssymb}
\begin{document}
\begin{tikzpicture}[scale=2,transform shape]
\draw (1,0) arc (0:90:1);
\draw (-1,0) arc (180:270:1);
\draw[fill=gray!30] (-1,0) -- (-2,0) arc (180:90:2) -- (0,1) arc (90:180:1);
\draw[fill=gray!30] (1,0) -- (2,0) arc (0:-90:2) -- (0,-1) arc (-90:0:1);
\node at (0.2,0.75) {\tiny $\phi^2$};
\node[rotate=50] at (-0.7,0.5) {\tiny $t=0$};
\node[rotate=50] at (0.7,-0.5) {\tiny $t=0$};
\node[rotate=50] at (-1.45,1.2) {\tiny $t=1$};
\node[rotate=50] at (1.45,-1.2) {\tiny $t=1$};
\node[rotate=50] at (-1.6,1.4) {\tiny $\partial \varphi (1)$};
\node[rotate=50] at (1.6,-1.4) {\tiny $\partial \varphi (1)$};
\node at (-2,2) {\tiny $\Omega_1$};
\node at (2,-2) {\tiny $\Omega_2$};
\node at (-1,1) {\tiny $\Delta \mathfrak{M}^2$};
\node at (1,-1) {\tiny $\Delta \mathfrak{M}^2$};
\end{tikzpicture}

\end{document} • Thank you for your answer. Is it possible to add a $\Delta \mathfrak{M}^2$ and $\Delta \mathfrak{M}^2$ in each annulus, as well as to shade them light gray? Nov 10, 2013 at 1:24
• In the middle of each annulus, horizontal. Nov 10, 2013 at 1:29
• As well as upscaling Nov 10, 2013 at 1:46
• I seriously hate arcs in tikz Nov 10, 2013 at 13:26
• @Marienplatz maybe, but everything is a riddle. Like how to do arc centered at (x,y) with radius Z, going from angle ThetaA to ThetaB in degrees. Nov 10, 2013 at 13:53

With the next version of TikZ it is finally possible to place nodes along arcs. This is used here with the CVS version of TikZ. (Although, it is relatively easy to calculate the positions and rotations here manually.)

## Code

\documentclass[tikz]{standalone}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}[>=latex, declare function={smallR=2; bigR=2*smallR;}, delta angle=90,
my ring sectors/.style={fill=gray, nodes={midway, sloped}}]
\filldraw[my ring sectors]
(left:smallR) arc[radius=smallR, start angle=180, delta angle=-90] node[below] {$t=0$}
-- (up:bigR) arc[radius=bigR, start angle=90]                     node[below] {$t=1$}
node[above] {$\partial\varphi(1)$} -- cycle
(right:smallR) arc[radius=smallR, start angle=0, delta angle=-90]  node[above] {$t=0$}
-- (down:bigR) arc[radius=bigR, start angle=-90]                   node[above] {$t=1$}
node[below] {$\partial\varphi(1)$} -- cycle;

(left:smallR) arc[start angle=180];
\node[below] at (up:smallR) {$\phi^2$};
\path (-bigR,bigR) --
node[at start]   {$\Omega_1$}
node[near start] {$\Delta \mathfrak{M}^2$}% or at (135:.5*bigR+.5*smallR)
node[near end]   {$\Delta \mathfrak{M}^2$}% or at (-45:.5*bigR+.5*smallR)
node[at end]     {$\Omega_2$} (bigR,-bigR);
\end{tikzpicture}
\end{document}


## Output • 1171 characters. Nov 10, 2013 at 12:58

Exploiting the symmetrical properties of the diagram in question with PSTricks. It only consumes 583 characters.

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{amssymb}
\SpecialCoor
\degrees

\def\Atom#1%
{%
\pscustom[fillstyle=solid,fillcolor=lightgray]
{
\psarc(0,0){4}{2}{4}
\psarcn(0,0){2}{4}{2}
\closepath
}
\foreach \A/\B/\C in
{
1.7/0/t=0,
3.0/1/\Delta \mathfrak{M}^2,
3.7/0/t=1,
4.3/0/\partial \varphi (1)
}
{
\rput{\ifnum\B=1 *0\else *1\fi}(\A;3){$\C$}
\rput{*0}(-4,4){$\Omega_#1$}
}%
}

\begin{document}
\begin{pspicture}(-4,-4)(4,4)
\Atom1
\rput{4}{\Atom2}
\pscircle[dimen=m]{2}
\rput(1.7;2){$\phi^2$}
\end{pspicture}
\end{document} \documentclass{standalone}
\usepackage{tikz}
\usepackage{amssymb}
\begin{document}
\tikz{\foreach\i in{0,180}
\path[rotate=\i,fill=gray,draw=black](0:0)--(0:3)arc(0:-90:3)--cycle;
\foreach\i in{1,2}
\foreach\r/\s[count=\c]in{5/t=0,8/\Delta\mathfrak M^2,11/t=1,20/\Omega_\i,13/\partial\varphi(1)}
\node[rotate={mod(\c,2)*45}]at(\i*180-45:\r/4){$\s$};
\node at(90:1.25){$\Phi^2$};}
\end{document} • 446 chars, it is the fewest! +1 you can save more by moving tikz as the class option. Nov 10, 2013 at 20:01

Here is my crack at it. I personally find the notation draw(x1,y1) to[in=A,out=B](x2,y2); much easier to work with, as opposed to the crypto mind-bending arc and friends which makes me want to go and drink something strong.

@Jake made a great suggestion to replace with bend right=45 or bend left=45 instead which is even easier to understand.

\documentclass[tikz]{standalone}
\usepackage{amssymb,mathpazo}
\begin{document}
\begin{tikzpicture}
\tikzset{e/.style={rotate=45},
n/.style={e,anchor=north},
s/.style={e,anchor=south},
f/.style={fill=lightgray},
bl/.style={bend left=45},
br/.style={bend right=45},}
\draw   (2, 0) to[br] (0, 2)
(-2,0) to[br] (0,-2);
\draw[f](0, 2) to[br] (-2,0) -- (-4,0) to[bl] (0, 4) -- (0, 2)
(0,-2) to[br] (2, 0) -- (4, 0) to[bl] (0,-4) -- (0,-2);
\node[anchor=north]at (0,2){$\phi^2$};
\node at (-4,4){$\Omega_1$};
\node at (4,-4){$\Omega_2$};
\node[n] at (-1.4,1.4){$t=0$};
\node[s] at (1.4,-1.4){$t=0$};
\node[n] at (-2.8,2.8){$t=1$};
\node[s] at (2.8,-2.8){$t=1$};
\node[s] at (-2.8,2.8){$\partial \varphi(1)$};
\node[n] at (2.8,-2.8){$\partial \varphi(1)$};
\node at (-2.1,2.1) {$\Delta \mathfrak{M}^2$};
\node at (2.1,-2.1) {$\Delta \mathfrak{M}^2$};
\end{tikzpicture}
\end{document} • You can simplify things a bit further by using bend left=45 and bend right=45 instead of specifying the in and out angles.
– Jake
Nov 10, 2013 at 14:04
• Don't forget to cancel the rotation applied to \Delta.... 1073 chars. Nov 10, 2013 at 14:07
• @Jake That suggestion is great. I have made modifications accordingly. Nov 10, 2013 at 14:15 Countdown=457 characters (Asymptote,Linux). ring.asy:

size(220);
usepackage("amssymb");
draw(unitcircle);
string[] s={"$\partial\varphi(1)$","$t=0$","$t=1$","$\Omega_","$\Delta\mathfrak{M}^2$"}; real[] d={2,1,2,-2,-1,-2}; pair[] p={NW,SE,SE,SE,NW,NW}; guide r=arc(N-N,2,90,180)--arc(N-N,1,180,90,CW)--cycle; filldraw(rotate(180)*r^^r,gray); for(int i=0;i<6;++i){ label(rotate(45)*s[i%3],d[i]*NW,p[i]); } label("$\phi^2$",N,S); label(s+"1$",3NW);
label(s+"2\$",3SE);
label(s,1.5NW);
label(s,1.5SE);


To get a standalone ring.pdf, run asy -f pdf ring.asy.

• It does not need \documentclass? Nov 10, 2013 at 15:20
• @Marienplatz: AFAIK, for the moment for non-inline standalone mode it uses \documentclass[12pt]{article} as default. Nov 10, 2013 at 15:30
• Interesting: I usually find that when I do something with both Asymptote and TikZ, the Asymptote code is a bit longer. But that's probably because I deliberately write in a style that values robustness over compactness, and dividing a task into several lines of code is more natural in Asymptote than in TikZ. Nov 10, 2013 at 20:25