Let us call surface patch a smooth function $x:U\to\mathbb R^3$ with domain an open set in $\mathbb R^2$ that is injective and has linearly independent partial derivatives at each point of its domain.
The image of such a thing can be closed. For example, the function $x:(-\pi/2,3\pi/2)\times\mathbb R\mapsto\mathbb R^3$ with $$x(\theta,t)=(\cos\theta,\sin2\theta,t)$$ for all $(\theta,t)$ in the domain of $x$ works. Here is a picture of the image of $(-\pi/2,3\pi/2)\times[0,1]$:
This example is constructed from the curve $$\gamma:\theta\in(-\pi/2,3\pi/2)\mapsto(\cos t,\sin2t)\in\mathbb R^2$$ by adding one extra coordinate that does not see any action. This curve has the property that its image is closed.
In principle, we can wrap the $t$ direction in the surface patch $x$ so that we also have such a flowery shape, and obtain a surface patch with compact image… but it seems complicated to do.
Does anyone have an example of a surface patch with compact image that is simpler than this?

