TITLE: Realizing Morse functions on $S^2$ as height functions
QUESTION [7 upvotes]: Let $h: \mathbb{R}^3 \to \mathbb{R}$ be the usual height function (i.e. $h(x,y,z) = z$).  One way that Morse functions on $S^2$ are often described is by picking an embedding $i: S^2 \to \mathbb{R}^3$ and then considering $h \circ i$ which, for a generic embedding will be a Morse function.  
Does there exist a Morse function $f : S^2 \to \mathbb{R}$ so that there is no embedding $i: S^2 \to \mathbb{R}^3$ with $f = h \circ i$?  
I think that this shows that every Morse function on $S^2$ can be factored through an immersion, but I am interested in embeddings.

REPLY [8 votes]: Any Morse function on $S^2$ may be realized by an embedding $S^2\hookrightarrow \mathbb{R}^3 \to \mathbb{R}$. For a Morse function $F:S^2\to \mathbb{R}$, take the equivalence relation with equivalence classes given by the components of the level sets of the Morse function $F$. The quotient of the sphere by this equivalence relation is a cubic tree $\mathcal{T}$, with inducted function $f:\mathcal{T}\to\mathbb{R}$ on the quotient. 

This was used more generally by Hatcher and Thurston to obtain a presentation of the mapping class group (the figure is from their paper). 
Hatcher, Allen E.; Thurston, William P., A presentation for the mapping class group of a closed orientable surface, Topology 19, 221-237 (1980). ZBL0447.57005.
Now we may embed the tree  $\mathcal{T}\hookrightarrow \mathbb{R}^3 \to \mathbb{R}$ so that the composite is $f$ (essentially by general position). Then taking a regular neighborhood of $\mathcal{T}$, we get an embedding $S^2 \hookrightarrow \mathbb{R}^3\to \mathbb{R}$ that induces the Morse function $F$.