surface to surface map, $f$ is closed but neither open nor continuous I'm trying to teach my self topology. The book I'm using has the following problem:

Give an example of two subsets $X,Y \subseteq \mathbb R ^2$, both considered as topological spaces with their Euclidean topologies, together with a map $f : X \rightarrow Y$ that has the property:
  * $f$ is closed but neither open nor continuous. 

I went a little overboard on this one, and made my own programs to visualize the function and it's inverse. 
I basically have 2 questions:
(1)I have an example that I'm pretty sure is good. Is it a good example and are my justifications valid?
(2) Can anyone please come up with another example of a surface to surface map?

$g$ is a function that is used in the main function $f$.

$
g(x,y) = \left\{
        \begin{array}{ll}
            x+y+10 & \quad max(|x|, |y|) \leq 2 \\
            x+y & \quad  \text{ else } 
        \end{array}
    \right.
$

$X=[-4,4]\times[-4,4]$
  $Y=[0,32]\times[-14,14]$
  $f: X \rightarrow Y$
  $f(x,y) = (x^2+y^2, g(x,y) )$


The above figure, made by my computer program, shows the mapping of $f$. The function is not one-to-one, so if the entire domain was mapped, there would be 2 "sheets" (like a Riemann surface). I choose to visualize this by coloring the points below y=x and above y=x in such a way that their mapping would produce an identical image. I also included the equations of the boundaries of the range.  
(not open) Let $D = B_1(0,0)$ (the unit disk). Let $R$ be the region bounded by $x \geq \frac{1}{2}y^2-10y+50$  and $x < 1$. Then $f(D) = R$. $D$ is open, and $R$ is not open. ( see diagram below) 

The above figure, shows the mapping of the domain and range of the unit disk.  The image of the  boundary of the disk is a line segment on the line x=1, shown as rainbow colors. The Image of the line x=y, shown in magenta, is a close boundary. Some of the coordinates are also shown, to illustrate the scale.
(not continuous) The diagram below shows an open ball,let's call it $U$, in the co-domain of $f$, it also shows how $f^{-1}$ would map the ball. The ball is connected on the left, but broken into two disjoint regions on the right. The blue edge(on the right) is "closed"; $f^{-1}(U)$ is not open; The pre-image of $U$ is not open, and thus, $f$ is not continuous. (see diagram below)

The above figure shows the inverse mapping. It does not perfectly map the range back to the domain due the the precision limitations of my program. I included a red dot, labeled with a 'p', to show that the pre-image of a point will be two points,(because the function is not one-to-one). The disk on the left is broken into two parts on the right. The blue edge is closed and the purpler edge is open.
(closed) I'm not sure how to definitively prove the function is closed, but un-closed function seem to have something relate to a horizontal asymptote, and this function doesn't have anything like that.
 A: I think you're working far too hard. Pulling $X=\mathbb{R}^2$ apart works well!
Define $f\colon X\to\mathbb{R}^2\setminus\{ [-1,1]\times(-\infty,\infty)\}$ by $f(x,y)=(x,y)$ if $|x|>1$, $f(x,y)=(x+4,y)$ if $|x|\le 1$.
Let's call $Y=\mathbb{R}^2\setminus\{ [-1,1]\times(-\infty,\infty)\}$.
This isn't open because the image of the infinite vertical strip on the interval $(-2,2)$ is the union of the infinite vertical strips on the intervals $(-2,1)$, $(1,2)$ and $[3,5]$. This last infinite strip on $[3,5]$ is neither open nor closed in $Y$ and prevents the tripartite union from being open.
This is closed because if $A\subseteq \mathbb{R}^2$ is closed, and $A\cap([-1,1]\times(-\infty,\infty))=\emptyset$, then we're done, else, $A\cap([-1,1]\times(-\infty,\infty))=C$ where $C$ is closed and nonempty, hence, $A=A\setminus C\cup C$ and $f\left(A\setminus C\cup C\right)=A\setminus C\cup \{C+(4,0)\}$. Now $A\setminus C$ is closed in $Y$ since $A\cap Y=A\setminus C$. The set $C+(4,0)=\{(x+4,y)\colon \exists x,y\in\mathbb{R}^2, (x,y)\in C\}$ is contained within the infinite vertical strip on $[3,5]$ and is obviously closed in the subspace topology as well, whence, their union is closed.
This is discontinuous. Using the equivalent condition of continuity preserving closed sets under preimage, the preimage of $(1,2]\times[-1,1]\subseteq Y$ is $(1,2]\times[-1,1]\subseteq\mathbb{R}^2$. But $(1,2]\times[-1,1]$ is closed in $Y$ as $([0,2]\times[-1,1])\cap Y=(1,2]\times[-1,1]$ but $(1,2]\times[-1,1]$ is neither open nor closed in $\mathbb{R}^2$.
