Function with one level set - circle. I am looking for a function with only one circle level set.
In other words : 
I am looking for function $f : R^n\rightarrow R$ and a set (level set) $\{q\in\ R^n :f(q)=p \}$
when $p = z$(some number) this set is circle.
How to solve this problem?
I think that function should look like this (for example for n=2):
$\frac{x^2}{r}+\frac{y^2}{z}$ for some $r,z \in R$ but I have no idea how exatcly.
 A: Consider this. Define $f: \mathbb{R}^{n} \to \mathbb{R}$ as follows, where $S = \{ x \in \mathbb{R}^{n} : \| x \| = 1 \}$, and $g : \mathbb{R}^{n} \setminus S \to [0, + \infty)$ is a bijection:
$$ f(x) = \begin{cases} 1 & x \in S \\ g(x) + 2 & x \not \in S \end{cases} .$$
Every level set will be singleton or empty, except the level set of $1$, which will be the unit sphere.
EDIT
I'm gonna build the bijection from $[0, + \infty)$ to $\mathbb{R}^{n} \setminus S$. First, let $p : [0, + \infty) \to \mathbb{R} $ by $$p(x) = \begin{cases} k + (x \mod 1) & x \in [2k, 2k + 1) \\ -(k + 1) + (x \mod 1) & x \in [2k + 1, 2k + 2) \end{cases}, $$ where $k \geq 0, k \in \mathbb{Z}$.
Set $q: \mathbb{R} \to \mathbb{R}^{2}$ to be a bijection (which can be constructed with choice; I'm not sure on how much choice if any is necessary to do it). Recursively construct $h_{j} : \mathbb{R}^{j - 1} \to \mathbb{R}^j$ by $h_{j}(t_{1} , \ldots, t_{j - 2}, q(t_{j - 1}))$, i.e. the $j - 1$ component of $h_{j} (t_{1}, \ldots, t_{j - 1})$ is the first component of $q(t_{j} )$, the $j$ component is the second. Let $r = h_{n} \circ h_{n - 1} \circ \cdots \circ h_{2}$, which will bijectively map $\mathbb{R}$ to $\mathbb{R}^{n}$.
Now, let $\sigma : (0, + \infty) \to (0, + \infty) \setminus \{ 1 \}$ be bijective (you can find this pretty easily). Construct $s : \mathbb{R}^{n} \to \mathbb{R}^{n} \setminus S$ by $$s(x) = \begin{cases} \mathbf{0} & x = \mathbf{0} \\ \frac{\sigma ( \| x \| )}{\| x \|} x & \textrm{otherwise} \end{cases} . $$ This will take a non-zero vector $x$ and return a vector pointing in the same direction, but with magnitude $\sigma( \|x \| )$. So now, we have $g^{-1} = s \circ r \circ p$.
A: This equation defines a circle iff $p=z$ and an ellipse otherwise:
$$x^2+\frac pzy^2=1.$$
You can rewrite it
$$z\frac{1-x^2}{y^2}=p.$$
This generalizes to $\mathbb R^n$, and you can easily find many variants.
