# Filling an angle arc with a pattern

Consider an angle (on a plane) with the vertex O, the initial side (ray1) and the terminal side (ray2). Assume the measure of this angle is less than 360 degrees. (There are two such angles.) Consider another ray (ray3) with the same vertex O that can rotate between ray1 and ray2 with center O. I want to shade the region swept out by ray3 using a hatch pattern. There are two possibilities.

(1) The rotation is counterclockwise
(2) The rotation is clockwise

After reading several questions and answers (at tex.sx on pgfplots), I have a reasonably acceptable answer to possibility (1). (See the code and the figure below.) (Please feel free to improve the answer to the first possibility.)

\documentclass[11pt]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns}
\begin{document}

\pgfdeclarepatternformonly[\LineSpace]{my north west lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{\LineSpace}{\LineSpace}}{\pgfqpoint{\LineSpace}{\LineSpace}}%
{
\pgfsetlinewidth{0.4pt}
\pgfpathmoveto{\pgfqpoint{0pt}{\LineSpace}}
\pgfpathlineto{\pgfqpoint{\LineSpace + 0.1pt}{-0.1pt}}
\pgfusepath{stroke}
}

\newdimen\LineSpace
\tikzset{
line space/.code={\LineSpace=#1},
line space=3pt
}

\begin{tikzpicture}

\begin{axis}[hide axis, xmin=-1, ymin=-1, xmax=10,ymax=10,
disabledatascaling]

{0};
{x};

{x/2};

{0};
{x};
\addplot[line space=5pt, pattern= my north west lines] fill between[of=A and B];
\draw [red, line width=2pt, ->] (axis cs:2,0) arc [radius=2, start angle=0,end angle=45];
\end{axis}
\end{tikzpicture}
\end{document}


Is it possible to get an answer to the second possibility?

Note: I want to shade the region within the angle so that the boundary of the shaded region has some sort of a blurry shape. (Definitely not a circular shape.) I failed miserably conveying this idea through my posted image. However, I might be able to get something reasonable by playing with the clipping idea.

Another option is use of clip within scope environment, based on the existing code.

Code:

\documentclass[border=10pt]{standalone}%[11pt]{article}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\usepackage{xcolor}
\usetikzlibrary{patterns}
\begin{document}

\pgfdeclarepatternformonly[\LineSpace]{my north west lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{\LineSpace}{\LineSpace}}{\pgfqpoint{\LineSpace}{\LineSpace}}%
{
\pgfsetlinewidth{0.4pt}
\pgfpathmoveto{\pgfqpoint{0pt}{\LineSpace}}
\pgfpathlineto{\pgfqpoint{\LineSpace + 0.1pt}{-0.1pt}}
\pgfusepath{stroke}
}

\newdimen\LineSpace
\tikzset{
line space/.code={\LineSpace=#1},
line space=3pt
}

\begin{tikzpicture}

\begin{axis}[hide axis, xmin=-10, ymin=-10, xmax=10,ymax=10,
disabledatascaling]

{0};
{x};
{x/2};

{0};
{x};
\begin{scope}
\clip[] (0:0)--(0:4) arc (0:-315:4);
\fill [line space=3pt,pattern= north east lines,pattern color=blue] (0,0) circle (2cm);
\end{scope}
\addplot[line space=5pt, pattern= my north west lines] fill between[of=A and B];
\draw [red, line width=2pt, ->] (axis cs:2,0) arc [radius=2, start angle=0,end angle=45];
\draw [blue, line width=1pt, ->] (axis cs:1,0) arc [radius=1, start angle=0,end angle=-315];
\end{axis}
\end{tikzpicture}
\end{document}

\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{patterns,angles}
\begin{document}

\tikz \draw (2,0) coordinate (A) -- (0,0) coordinate (B)
-- (-1,-1) coordinate (C)
pic [draw,->,red,pattern=north west lines] {angle = A--B--C}
pic [draw,<-,blue,pattern=north east lines,thick,angle radius=1cm] {angle = C--B--A};

\end{document}


\documentclass[11pt]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns,angles}
\begin{document}

\pgfdeclarepatternformonly[\LineSpace]{my north west lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{\LineSpace}{\LineSpace}}{\pgfqpoint{\LineSpace}{\LineSpace}}%
{
\pgfsetlinewidth{0.4pt}
\pgfpathmoveto{\pgfqpoint{0pt}{\LineSpace}}
\pgfpathlineto{\pgfqpoint{\LineSpace + 0.1pt}{-0.1pt}}
\pgfusepath{stroke}
}

\newdimen\LineSpace
\tikzset{
line space/.code={\LineSpace=#1},
line space=3pt
}

\begin{tikzpicture}

\begin{axis}[hide axis, xmin=-10, ymin=-10, xmax=10,ymax=10,
disabledatascaling]

{0};
{x};

{x/2};

{0}coordinate (A);                  %% define a coordinate