How do I fill the corner of an irregular shape in TikZ?

You could use path picture:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}

\begin{tikzpicture}
\draw[bend right=10]
  [path picture={\fill[blue!60](U)circle[radius=6mm];}]
  (0,0)coordinate(U)to (40:2)coordinate(R)to++(-30:2)coordinate(T)to cycle;
\end{tikzpicture}

\begin{tikzpicture}[decoration={random steps,segment length=5pt,amplitude=2pt}]
\draw[decorate]
  [path picture={\fill[blue!60](U)circle[radius=6mm];}]
  (0,0)coordinate(U)to (40:2)coordinate(R)to++(-30:2)coordinate(T)to cycle;
\end{tikzpicture}
\end{document}

enter image description here


You could also use draw and clip on \path and clip a circle that has its center at U, like:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}

\begin{tikzpicture}
\begin{scope}
 \path[draw,clip,bend right=10] (0,0) coordinate (U) to (40:2) coordinate (R) to ++(-30:2) coordinate (T) to cycle;
 \fill[blue!60] (U) circle (6mm);
\end{scope}
\end{tikzpicture}

\par

\begin{tikzpicture}[decoration={random steps,segment length=5pt,amplitude=2pt}]
\begin{scope}
 \path[draw,clip,decorate] (0,0) coordinate (U) to (40:2) coordinate (R) to ++(-30:2) coordinate (T) to cycle;
 \fill[blue!60] (U) circle (6mm);
\end{scope}
\end{tikzpicture}

\end{document}

enter image description here

Tags:

Tikz Pgf