\documentclass[11pt,leqno]{amsart}

%\usepackage{amsthm}

\newcommand{\pathtotrunk}{./}
\input{text/article_preamble}
\input{text/top_matter}
\input{text/kw_macros}

%\title{Blob Homology}
\title{Sandbox}

\begin{document}


\begin{figure}[t]
\begin{center}
\begin{tikzpicture}

\node(A) at (-4,0) {
\begin{tikzpicture}[scale=.8, fill=blue!15!white]
\filldraw[line width=1.5pt] (-.4,1) .. controls +(-1,-.1) and +(-1,0) .. (0,-1)
		.. controls +(1,0) and +(1,-.1) .. (.4,1) -- (.4,3)
		.. controls +(3,-.4) and +(3,0) .. (0,-3)
		.. controls +(-3,0) and +(-3,-.1) .. (-.4,3) -- cycle;
\node at (0,-2) {$X$};
\node (W) at (-2.7,-2) {$W$};
\node (Y1) at (-1.2,3.5) {$Y$};
\node (Y2) at (1.4,3.5) {$Y$};
\node[outer sep=2.3] (y1e) at (-.4,2) {};
\node[outer sep=2.3] (y2e) at (.4,2) {};
\node (we1) at (-2.2,-1.1) {};
\node (we2) at (-.6,-.7) {};
\draw[->] (Y1) -- (y1e);
\draw[->] (Y2) -- (y2e);
\draw[->] (W) .. controls +(0,.5) and +(-.5,-.2) .. (we1);
\draw[->] (W) .. controls +(.5,0) and +(-.2,-.5) .. (we2);
\end{tikzpicture}
};

\node(B) at (4,0) {
\begin{tikzpicture}[scale=.8, fill=blue!15!white]
\fill (0,1) .. controls +(-1,0) and +(-1,0) .. (0,-1)
		.. controls +(1,0) and +(1,0) .. (0,1) -- (0,3)
		.. controls +(3,0) and +(3,0) .. (0,-3)
		.. controls +(-3,0) and +(-3,0) .. (0,3) -- cycle;
\draw[line width=1.5pt] (0,1) .. controls +(-1,0) and +(-1,0) .. (0,-1)
		.. controls +(1,0) and +(1,0) .. (0,1);
\draw[line width=1.5pt] (0,3) .. controls +(3,0) and +(3,0) .. (0,-3)
		.. controls +(-3,0) and +(-3,0) .. (0,3);
\draw[line width=.5pt, black!65!white] (0,1) -- (0,3);
\node at (0,-2) {$X\sgl$};
\node (W) at (2.7,-2) {$W\sgl$};
\node (we1) at (2.2,-1.1) {};
\node (we2) at (.6,-.7) {};
\draw[->] (W) .. controls +(0,.5) and +(.5,-.2) .. (we1);
\draw[->] (W) .. controls +(-.5,0) and +(.2,-.5) .. (we2);
\end{tikzpicture}
};


\draw[->, red!80!green, line width=2pt] (A) -- node[above, black] {glue} (B);

\end{tikzpicture}
\end{center}
\caption{Gluing with corners}
\label{fig:gluing-with-corners}
\end{figure}





blah

\vfill\eject



\begin{tikzpicture}
\newcommand{\rr}{6}
\newcommand{\vertex}{node[circle,fill=black,inner sep=1pt] {}}

\node(A) at (0,0) {
\begin{tikzpicture}
\node[red,left] at (0,0)  {$y$};
\draw (0,0) \vertex arc (-120:-105:\rr) node[red,below] {$a$} arc(-105:-90:\rr) \vertex node[red,below](x2) {$x$};
\draw (0,0) \vertex arc (120:105:\rr) node[red,above] {$a$} arc (105:90:\rr) \vertex node[red,above](x1) {$x$} -- (x2);
\begin{scope}
	\path[clip] (0,0) arc (-120:-60:\rr) arc (60:120:\rr);
	\foreach \x in {0,0.24,...,3} {
		\draw[green!50!brown] (\x,1) -- (\x,-1);
	}
\end{scope}
\draw[red, decorate,decoration={brace,amplitude=5pt}] ($(x1)+(0.2,-0.2)$) -- ($(x2)+(0.2,0.2)$) node[midway, xshift=0.7cm] {$x \times I$};
\end{tikzpicture}
};

\node(B) at (-4,-4) {
\begin{tikzpicture}
\node[red,left] at (0,0) {$y$};
\draw (0,0) \vertex 
	arc (120:105:\rr) node[red,above] {$a$}
	arc (105:90:\rr) node[red,above] {$x$} \vertex
	arc (90:75:\rr) node[red,above] {$x \times I$}
	arc (75:60:\rr) \vertex node[red,right] {$x$}
	arc (-60:-90:\rr) node[red,below] {$a$}
	arc (-90:-120:\rr);
\begin{scope}
	\path[clip] (0,0) arc (-120:-60:\rr) arc (60:120:\rr);
	\foreach \x in {0,0.48,...,9} {
		\draw[green!50!brown] (\x/4,1) -- (\x,-1);
	}
\end{scope}
\end{tikzpicture}
};

\node(C) at (4,-4) {
\begin{tikzpicture}[y=-1cm]
\node[red,left] at (0,0) {$y$};
\draw (0,0) \vertex 
	arc (120:105:\rr) node[red,below] {$a$}
	arc (105:90:\rr) node[red,below] {$x$} \vertex
	arc (90:75:\rr) node[red,below] {$x \times I$}
	arc (75:60:\rr) \vertex node[red,right] {$x$}
	arc (-60:-90:\rr) node[red,above] {$a$}
	arc (-90:-120:\rr);
\begin{scope}
	\path[clip] (0,0) arc (-120:-60:\rr) arc (60:120:\rr);
	\foreach \x in {0,0.48,...,9} {
		\draw[green!50!brown] (\x/4,1) -- (\x,-1);
	}
\end{scope}
\end{tikzpicture}
};

\draw[->] (A) -- (B);
\draw[->] (A) -- (C);
\end{tikzpicture}
\end{document}
