# How to shade a region between two arcs of circle

I would like to shade the region between the two geodesics (a,b) and (b,c) in such a way that the color fades as the region becomes wider. This is the code

\documentclass{article}

\begin{document}

\begin{tikzpicture}

%circle

% b

\draw (0,2.3) node {$b$};

%a

\draw (-1.2,-1.8) node {$a$};

%c

\draw (2.3,0) node {$c$};

%geodesic (b,c)

\draw[name path=A, xshift=2cm, yshift=2cm, domain=180:270] plot(\x:2);

%geodesic (a,b)

\draw[name path=B, xshift=-6cm, yshift=1.6cm, domain=326:364] plot(\x:6);

\end{tikzpicture}

\end{document}


Can anybody tell me how to do it, please? Thanks a lot!

The following gives my solution, hoping it will satisfy your requirement. The basic idea is ti use \fill to fill the region consisted of a -- geodesics (a,b) -- b -- geodesics (b, c) -- c -- geodesics (c, a) -- a.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations,decorations.pathmorphing}

\begin{document}

\begin{tikzpicture}

%circle

% b

\draw (0,2.3) node {$b$};

%a

\draw (-1.2,-1.8) node {$a$};

%c

\draw (2.3,0) node {$c$};

\fill [path fading=south,top color=green!80!white, bottom color=blue!80!white, variable=\x]
(-1,-1.73)
-- plot[domain=326:364]({6*cos(\x)-6},{6*sin(\x)+1.6})
-- (0,2)
-- plot[domain=180:270]({2*cos(\x)+2}, {2*sin(\x)+2})
-- (2,0)
-- plot[domain=240:360]({2*cos(\x)}, {2*sin(\x)})
-- (-1,-1.73);

\end{tikzpicture}

\end{document}


The shading scheme is inspired by Tikz: Shading a path without any filling. However, this solution does not make the color shades as the region gets wider (maybe a more precise path fading setting will do).

The resulted figure looks as follows.

• Thanks! Would shadedraw work instead of fill? I might try, but thanks! Commented Mar 3, 2017 at 8:12

Note that some of the earlier items got overdrawn. Also, arcs are drawn from the end points and compute the centers based on the angle and radius. Adding the -- (B) etc. wasn't necessary, but helped debugging the code.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
%circle
% b
\filldraw (0,2) coordinate(B) circle [radius=1pt] node[above] {$b$};
%a
\filldraw (-1,-1.73) coordinate(A) circle [radius=1pt] node[below left] {$a$};
%c
\filldraw (2,0) coordinate(C) circle [radius=1pt] node[right] {$c$};
%geodesic (b,c)
\draw (B) arc[start angle=180, end angle=270, radius=2];
%geodesic (a,b)
\draw (A) arc[start angle=326, end angle=360, radius=6];