Example of function $F:\Bbb R^3\to \Bbb R$ such that preimage of it is curve 
I wanted to have Example of function $F:\Bbb R^3\to \Bbb R$ such that preimage of it is curve

Suppose $F(x,y,z)=0$ is the given locus .
I know that $x^2+y^2+z^2=0$ hasone points in locus
for $x^2+y^2+z^2−1=0$ is sphere
for $z−x^2−y^2=0$ this locus is kind of surface.
Is that possible that there is locus in 3 variables which is curve?
If yes then how to identify those.
Any Help will be appreciated.
 A: Take $F(x,y,z) = (y-x)^2 + (z-x)^2 = 0$, and you get the line $x=y=z$. If you take $F(x,y,z) = (y-x^2)^2 + (z-x^3)^2 = 0$, you get the curve parametrized by $(x,x^2,x^3)$ as $x$ varies over the real numbers.
In general, in order to get something that is not a surface you must take a function $F(x,y,z)$ whose partial derivatives are all equal to $0$ whenever $F(x,y,z)=0$.
A: You can actually make any closed set $C$ into a level set of a continuous function. We can define the infimal distance function
$$d_C(x) = \inf_{c \in C} \|x - c\|,$$
producing the distance from a point $x$ to the closest point in $C$. Such a function is continuous, and indeed, non-expansive, meaning that $|d_C(x) - d_C(y)| \le \|x - y\|$ for all $x, y$.
When $x \in C$, we have $d_C(x) = 0$, and if $C$ is closed, then $d_C(x) = 0 \implies x \in C$. That is,
$$d_C^{-1}\{0\} = C.$$
(More generally, if $C$ is not closed, then $d_C^{-1}$ is the closure of $C$. Even more generally, this result works in general metric spaces.)
My point is, if you don't care about having a nice formula to compute, there is a huge class of sets that can be level sets of continuous functions.
