%Point A
\pgfmathparse{-1}\let\xa\pgfmathresult;
\pgfmathparse{-1}\let\ya\pgfmathresult;

%Point B
\pgfmathparse{ 1}\let\xb\pgfmathresult;
\pgfmathparse{ 1}\let\yb\pgfmathresult;

%Left and right limit for x
\pgfmathparse{-3}\let\xleft\pgfmathresult;
\pgfmathparse{ 3}\let\xright\pgfmathresult;


\input{/usr/local/tikz/Common.tikz}
\input{/usr/local/tikz/Moulton/Calc.Moulton.tikz}
\input{/usr/local/tikz/Moulton/Styles.tikz}

\pgfmathparse{\m*\xleft+\k}\let\ybottom\pgfmathresult;
\pgfmathparse{ 3}\let\ytop\pgfmathresult;


\fill
   [color=gray,opacity=0.1]
   (0,\ytop)
   --
   (C)
   --
   (\xleft,\m*\xleft+\k)
   --
   (\xleft,\ytop)
   --
   cycle;

\fill
   [color=gray,opacity=0.3]
   (0,\ytop)
   --
   (C)
   --
   (\xright,0.5*\m*\xright+\k)
   --
   (\xright,\ytop)
   --
   cycle;

\fill
   [color=gray,opacity=0.5]
   (0,\ybottom)
   --
   (C)
   --
   (\xright,0.5*\m*\xright+\k)
   --
   (\xright,\ybottom)
   --
   cycle;

\fill
   [color=gray,opacity=0.7]
   (0,\ybottom)
   --
   (C)
   --
   (\xleft,\m*\xleft+\k)
   --
   (\xleft,\ybottom)
   --
   cycle;

\pgfmathparse{0.5}\let\xpos\pgfmathresult;
\pgfmathparse{0.65}\let\ypos\pgfmathresult;

\draw ($(\xpos*\xleft,\ypos*\ytop)$) node []{$A_1$};
\draw ($(\xpos*\xright,\ypos*\ytop)$) node []{$B_1$};

\pgfmathparse{0.25}\let\xpos\pgfmathresult;
\pgfmathparse{0.75}\let\ypos\pgfmathresult;
\draw ($(\xpos*\xleft, -\ypos*\ytop)$) node []{$A_2$};
\draw ($(\xpos*\xright,-\ypos*\ytop)$) node []{$B_2$};

\draw [-Latex] (\xleft,0)    -- (\xright,0) node [right] {$x$};
\draw [-Latex] (0,\ybottom)  -- (0,\ytop)   node [above] {$y$};


\input{/usr/local/tikz/Moulton/Draw.Line.tikz}
\input{\TiKZPath/Moulton/Draw.ABC.tikz}

