How to fill a shape defined by arcs?
with help of backgrounds
and intersections
libraries:
\documentclass[tikz, margin=3mm]{standalone}%{article}
%\usepackage{tikz}
\usetikzlibrary{backgrounds, intersections}
\begin{document}
% \begin{figure}[htbp]
% \centering
\begin{tikzpicture}[scale=3]
% fill arcs and determine their names
\fill[white, name path=a] (0.95572,-0.29428) arc (-19.41:18.41:1);
\fill[white, name path=b] (0.9414, 0.33728) arc (226:254:1.5);
\fill[white, name path=c] (1.58918, 0.04265) arc (102:122:2);
% calculate intersections
\path[name intersections={of=a and b, by={ab}}] ;
\path[name intersections={of=a and c, by={ac}}] ;
\path[name intersections={of=b and c, by={bc}}] ;
% background fill
\scoped[on background layer]\fill[red] (ab) -- (ac) -- (bc) -- cycle; % color determine according to your wish
% drawing arcs agaib
\draw (0.95572,-0.29428) arc (-19.41:18.41:1);
\draw (0.9414, 0.33728) arc (226:254:1.5);
\draw (1.58918, 0.04265) arc (102:122:2);
\end{tikzpicture}
% \end{figure}
\end{document}
This is the first step: add --
. The second step is to clip. This yields
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{intersections}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{tikzpicture}[scale=3]
\tikzstyle{intersection} = [draw, circle ,fill=darkgray, inner sep=0.4mm]
\draw[name path=path1] (0.95572,-0.29428) arc (-19.41:18.41:1);
\draw[name path=path2] (0.9414, 0.33728) arc (226:254:1.5);
\draw[name path=path3] (1.58918, 0.04265) arc (102:122:2);
\path[name intersections={of=path1 and path2,by=x12}];
\path[name intersections={of=path2 and path3,by=x23}];
\path[name intersections={of=path3 and path1,by=x31}];
\begin{scope}
\clip (x12)--(x23)--(x31)--cycle;
\filldraw[draw=black,fill=blue] (0.95572,-0.29428) arc (-19.41:18.41:1) -- (0.9414, 0.33728) arc
(226:254:1.5)-- (1.58918, 0.04265) arc (102:122:2);
\end{scope}
\end{tikzpicture}
\end{figure}
\end{document}
EDIT: I only made the code a bit shorter and changed the fill color, otherwise this is the original code.