How to Plot Band Bending Using \LaTeX TikZ

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\title{How to Plot Band Bending Using \LaTeX Tikz}
\author{Hariprasad Narayanan\\National Centre for Catalysis Research\\ Indian Institute of Technology Madras, Chennai-600036}
\begin{document}
\maketitle
\section{Upward Band Bending}
\begin{tikzpicture}
\draw[pattern=dots, pattern color=blue] (0,0) rectangle (4,3); 

\fill[pattern=north east lines] (4,3) to [bend right] (6,4) -- (6,1) to [bend right] (4,0)--(6,1) to [bend right] (4,0)--(6,1) to [bend left] (4,0); 

\draw (4,3) to [bend right] (6,4); 
\draw (4,0) to [bend right] (6,1);
\draw[thick] (6,4)--(6,1);      
%\draw[thick, <->] (4,-1)--(6,-1);
\draw[thick, <->] (4,-0.5) -- (6,-0.5) node[midway, below] {Depletion Layer};
\draw[thick,<->] (0, -0.5)--(4,-0.5) node[midway, below] {Active PL Region};
\end{tikzpicture}

\section{Downward Band Bending}
\begin{tikzpicture}
\draw[pattern=dots, pattern color=blue] (0,0) rectangle (4,3); 

\fill[pattern=north east lines] (4,3) to [bend left] (6,2) -- (6,-1) to [bend right] (4,0); 

\draw (4,3) to [bend left] (6,2); 
\draw[thick,<->] (4,3.5) -- (6,3.5) node[midway,above] {Depletion Region};
\draw[thick,<->] (0,3.5)--(4,3.5) node[midway, above] {Active PL Region};
\draw (4,0) to [bend left] (6,-1);
\draw[thick] (6,2)--(6,-1); 
     
\end{tikzpicture}

\section{Flat Band Condition}
\begin{tikzpicture}
\draw[pattern=dots, pattern color=blue] (0,0) rectangle (4,3); 

\fill[pattern=north east lines] (4,3) -- (6,3) -- (6,0) -- (4,0); 

\draw (4,3) -- (6,3); 
\draw (4,0) -- (6,0);
\draw[thick] (6,3)--(6,0); 
\draw[thick, <->] (4,-0.5)--(6,-0.5) node[midway, below] {Depletion Region};
\draw[thick,<->] (0,-0.5)--(4,-0.5) node[midway, below]{Active PL Region};
\end{tikzpicture}  
\end{document}