I came across this question a few days ago while trying to construct a real-valued function $f(x,y,z)$ whose level surface $A=\{x\in \mathbb{R}^3 : f(x,y,z)=0\}$ is a torus:
In general, can a level surface $\{x\in \mathbb{R}^3 : f(x,y,z)=c\}$ of a real-valued function $f(x,y,z)$ have genus 1 or higher? If so, what is an example of such a function?
Likely because I have no experience in topology or differential geometry, a quick Google search did not provide an answer this question.