Mapping $\mathbb{R}^n$ "close" to integer points For $\epsilon>0$ and a given $n$, define $$S_\epsilon=\bigcup_{x\in\mathbb{Z}^n}B_\epsilon(x)\subset\mathbb{R}^n$$ where $B_\epsilon(x)$ is the open ball of radius $\epsilon$ around the point $x$ in $\mathbb{R}^n$. Essentially, $S_\epsilon$ is the set of points in $\mathbb{R}^n$ that are "close enough" to (within $\epsilon$ of) an integer point. Define $f:\mathbb{R}^n\times\mathbb{R}_{>0}\to\mathbb{R}$ with $$f(x,\epsilon)=\inf\{\delta\geq1\mid\delta x\in S_\epsilon\}$$Note $\delta x=(\delta x_1,\dots,\delta x_n)$. Intuitively, we see this function is well defined as every point is "close enough" to a rational point, which can itself be multiplied to an integer. I have two main questions surrounding this function:
1) For what values of $\epsilon$ is this function continuous? Clearly, if $\epsilon$ is large enough, depending on the dimention, then $f\equiv 1$ everywhere. Can $\epsilon$ be made smaller and preserve continuity?
2) Is $f$ smooth, either with respect to $x$ or $\epsilon$? This one seems a little bit more hopeless, as the function essentially has "hills" which plateau on $S_\epsilon$. If we were looking at closed balls around integer points instead of open, would that change anything with respect to smoothness?
While those two questions are the main focus of this post, I would greatly appreciate any additional remarks about $f$. Thank you!
 A: The answer to both question is no. The point $(\frac{ \epsilon} {\sqrt n}, \dots,  \frac{ \epsilon} { \sqrt  n}, \epsilon) $ for $ \epsilon<\frac{ \sqrt n} {2}$ is a counterexample
A: I assume the norm is the euclidean norm.
1) Indeed, $f(\cdot, \varepsilon)$ is continuous iff $\varepsilon$ is big enough for the closure of $\bigcup \limits_{z \in \mathbb{Z}^n} B_{\varepsilon}(z)$ to cover completely $\mathbb{R}^n$. Assume otherwise. Translating, we can assume to have an open set $O \subset B_1(0)$, $O \subset \mathbb{R}^n - \bigcup \limits_{z \in \mathbb{Z}^n} B_{\varepsilon}(z)$. 
Let us denote $k_0 = (1,0,...,0)$ and $k = (\lceil \frac{1}{\varepsilon} \rceil,0,...,0)$. Let $x \in k+O$. I am going to show that $f$ is not continuous somewhere between $0$ and $x$. Let $y := tx$ with $t := \inf \{t \in [0,1]\ |\ \forall s \in [t,1], sx \notin \bigcup \limits_{z \in \mathbb{Z}^n} B_{\varepsilon}(z)\}$. We have $\big|\frac{1}{\lceil 1/\varepsilon \rceil} x - k_0\big| = \frac{1}{\lceil 1/\varepsilon\rceil}|x-k| < \varepsilon$ because $x-k \in O \subset B_1(0)$. Hence $\frac{1}{\lceil 1/\varepsilon\rceil}x \in B_{\varepsilon}(k_0)$, so $t \ge \frac{1}{\lceil 1/\varepsilon\rceil} > 0$. Hence for some $t'$ in a neighborhood of $t^-$, we have $f(t'x) = 1$. And for $t' \in [t,1]$, for $s \in [t', 1]$, $sx \notin \bigcup \limits_{z \in \mathbb{Z}^n} B_{\varepsilon}(z)$ so $f(t'x) = \frac{1}{t'} f(x) \ge\frac{1}{t'} > \frac{1}{t} \ge 1$. Hence $f$ is not continuous at $t$.
2) Same as before, if $\varepsilon_0$ is the smallest value of $\varepsilon$ such that the closure of $\bigcup \limits_{z \in \mathbb{Z}^n} B_{\varepsilon}(z)$ is $\mathbb{R}^n$, $f$ is not continuous with respect to $\varepsilon$ on $]0,\varepsilon_0$. Consider $y$ as it was defined in the first part (not that it was on the boundary of $\bigcup \limits_{z \in \mathbb{Z}^n} B_{\varepsilon}(z)$). We had $f(y,\varepsilon) = \frac{1}{t}f(x) > \frac{1}{t}$. For any $\varepsilon' > \varepsilon$, $y \in \bigcup \limits_{z \in \mathbb{Z}^n} B_{\varepsilon'}(z)$ so $f(y,\varepsilon')=1$. Hence the diccontinuity at all $\varepsilon < \varepsilon_0$.
