A problem on Gauss--Bonnet formula While teaching a course in differential geometry, I came up with the following problem, which I think is cool.
Assume $\gamma$ is a closed geodesic on a sphere $\Sigma$ with positive Gauss curvature.
Can it look like one of the following curves in a parametrization of $\Sigma\backslash\{\text{point}\}$ by the plane?


I expect that there is a theorem that answers all questions like this. Is it indeed so?

$$ $$
P.S. The first curve cannot appear since by Gauss--Bonnet formula, the sum of angles in the triangle is $>\pi$. It makes the integral of Gauss curvature inside the loops $>4{\cdot}\pi$ which is impossible.
The second curve cannot appear as well, a proof is sketched in my answer. (Please let me know if you see a way to simplify the proof.)
For the third one it is easy to produce an example --- say an ellipsoid has such geodesic.
 A: Here, I try to give a exemple for each of the number one and three curves with a convex polyhedron where I just draw the net. The geodesic are the dots lines (which are staight on the net). I think that one can also construct the second one as well by changing the angles of the triangle in the first exemple.
I don't know any theorem that gives a general answer for your question. My only gess is that if you don't have a trivial estimate that says that on a subset $B$,  $\int_B K \geq 4\pi $, then we should be able to construct a exemple.


EDIT : I just give some details of what anton says in his comment : in each small loop the integral of curvature is $\pi+\alpha_i$ with $\alpha_i$ the angle of the crossing. Because the curvature is positive the sum of the angles of the triangle is larger than $\pi$ and then the total curvature is larger than $3\pi+ \sum \alpha_i > 4\pi$. (However with a polyhedron we can still obtain an equality)
A: Here's a half-baked idea involving minimal surfaces (when I have time I will see if I can make this a little more meaningful).
Consider the compact three manifold $M=\Sigma \times \mathbb{S}^1$ with the product metric metric $g+d\theta^2$.  This metric has positive scalar curvature.  Let $\Pi: M\to \Sigma$ be the natural projection map and observe that the scalar curvature of $M$ satisfies
$$
R_M(p)=R_{\Sigma}(\Pi(p))=2K_{\Sigma}(\Pi(p)).
$$
Obviously, for any $\epsilon>0$ we can perturb the curve $\gamma\subset \Sigma\times \{ 0\}$ to $\gamma_\epsilon$ an embedded curve in $M$ so that $\gamma_\epsilon$ has $C^3$ norm within $\epsilon$ of $\gamma$ and $\Pi(\gamma_\epsilon)=\gamma$.  In particular, the geodesic curvature of $\gamma_{\epsilon}$ satisfies $\kappa_{\gamma_\epsilon}=o(\epsilon)$.
Now let $\Gamma_{\mathbb{Z}}(\epsilon)$ be the GMT solution to the Plateau problem with boundary $\gamma_\epsilon$ obtained by minimizing in the space of integer coefficient integral currents and let $\Gamma_{\mathbb{Z}_2}(\epsilon)$ be the solution obtained by minimizing in the space of $\mathbb{Z}_2$ coefficient integral currents. By standard regularity theory, by these are smooth surfaces with boundary $\gamma_\epsilon$ -- $\Gamma_{\mathbb{Z}}$ is orientable while $\Gamma_{\mathbb{Z}_2}$ need not be. Moreover, by standard compactness arguemnts one has that as $\epsilon\to 0$,  $\Gamma_{\mathbb{Z}}(\epsilon)\to \Gamma_{\mathbb{Z}}$ where $\Gamma_{\mathbb{Z}}$ is the minimizer (in space of $\mathbb{Z}$-currents) with boundary $\gamma$ and can be thought of as a continuous map from $\Sigma\backslash \gamma\to \mathbb{Z}$ (the function counts multiplicity).  Similarly, $\Gamma_{\mathbb{Z}_2}(\epsilon)\to \Gamma_{\mathbb{Z}_2}$ where $\Gamma_{\mathbb{Z}_2}$ is the minimizer in $\mathbb{Z}_2$ currents
Let $p_1, \ldots, p_N$ be the self-intersection points of $\gamma$.  By standard boundary regularity estimates, away from $p_1, \ldots, p_N$ the convergence of $\Gamma_{\mathbb{Z}}(\epsilon)$ is smooth (so $|A_{\Gamma_{\mathbb{Z}}(\epsilon)}|=o(\epsilon)$ while by a blow up argument one should have
$$
\int_{\Gamma_{\mathbb{Z}}(\epsilon)\cap B_{\delta}(p_i)} \frac{1}{2}|A_{\Gamma_{\mathbb{Z}}(\epsilon)}|^2 = 2\pi \theta_i +o(\epsilon)+o(\delta)
$$
where here $\theta_i\in [0, 1]$ is related to the angle that $\gamma$ makes at $p_i$ and also to what $\Gamma_{\mathbb{Z}}$ looks like.  The same holds for $\Gamma_{\mathbb{Z}_2}(\epsilon)$ though the values of $\theta_i$ may be different.
By the Gauss equations one has
$$
Ric_M(\nu,\nu)=\frac{1}{2} (R_M-K_{\Gamma_{\mathbb{Z}}(\epsilon)}-|A_{\Gamma_{\mathbb{Z}}(\epsilon)}|^2).
$$
Notice $Ric_M(\nu,\nu)=o(\epsilon)$ away from $p_1,\ldots, p_N$ and $Ric_M(\nu,\nu)=O(1)$ every where and one has uniform area bounds.
Hence, integrating this formula, using Gauss Bonnet and the convergence properties above gives
$$
2\pi \geq 2\pi \chi(\Gamma_{\mathbb{Z}}(\epsilon)) = \int_{|\Gamma_{\mathbb{Z}} |} K_{M}-2\pi \sum_{i=1}^N \theta_i +o(\epsilon).
$$
(where the integral over $|\Gamma_\mathbb{Z}|$ means to count multiplicity but not sign.
Similarly,
$$
2\pi\geq 2\pi \chi(\Gamma_{\mathbb{Z}_2}(\epsilon)) = \int_{|\Gamma_{\mathbb{Z}_2} |} K_{M}-2\pi \sum_{i=1}^N \theta_i +o(\epsilon).
$$
I suspect that solving the appropriate Plateau problem for $\gamma$ (I feel $\mathbb{Z}_2$ coefficients might be more enlightening) should give obstructions. 
EDIT:
I believe I can use this computation (with $\mathbb{Z}$ coefficients) to rule out the second figure.  I may have made a mistake and it is also possible that if this is correct it can still be proved using more elementary arguments... 
Label the components of $\Sigma\backslash \gamma$ as follows: To top (i.e. the inverted) lobe is $A$, the left lobe is $B$ the right lobe is $C$ the remaining bounded component (in the figure) is $D$ and the unbounded component is $E$.  Denote the self-intersection points $p_A$, $p_B$ and $p_C$  (so $p_A$ is the top self-intersection point, $p_B$ the left one and $p_C$ the right one).  Label the angle inside the lobe $A$ at $p_A$, $\phi_A$ and let $\phi_B$ and $\phi_C$ be similar.  
If I worked things out correctly, a $\mathbb{Z}$ minimizer must be either $-2A-D+B+C$ or $2B+2C-A+E$.  
Lets consider the first case.  Blow up analysis implies that the $\theta_A$ is equal to $0$ at $p_A$ in this case (since there are two sheets).  On the other hand, $\theta_B=\frac{1}{\pi} \phi_B$ and $\theta_C=\frac{1}{\pi} \phi_C$  Hence, the formula gives
$$
2\pi-4\pi g= 2\int_A K_\Sigma+ \int_B K_\Sigma+\int_C K_\Sigma+\int_D K_\Sigma -2 \phi_B-2\phi_C
$$
Now by Gauss-Bonnet we have
$$
2\pi =\int_{E} K_\Sigma +\pi-\phi_A+ 2\phi_B+2\phi_C
$$ 
so plugging into the first formula gives
$$
2\pi -4\pi g= 2\int_A K_\Sigma+ \int_B K_\Sigma+\int_C K_\Sigma+\int_D K_\Sigma+\int_{E} K_\Sigma +\pi-\phi_A-2\pi\\=2\pi+\int_A K_\Sigma+\pi-\phi_A
$$
The positive curvature means the RHS is $>2\pi$ and gives a contradiction.
In the second case, one has $\theta_B=\theta_C=0$ and $\theta_A=\frac{1}{\pi} \phi_A$.   The formula gives
$$
2\pi-4\pi g= \int_A K_\Sigma+ 2\int_B K_\Sigma+ 2\int_C K_\Sigma +\int_E K_\Sigma -2 \phi_A
$$
Gauss-Bonnet applied to $A\cup D$ gives
$$
2\pi=\int_A K_\Sigma+\int_D K_\Sigma+ \pi-\phi_B+\pi-\phi_C+ \phi_A-\pi
$$ 
Adding the two equations gives
$$
4\pi(1-g)= 4\pi +\int_{A} K_\Sigma+ \int_B K_\Sigma +\int_C K_\Sigma +\pi-\phi_B+\pi-\phi_C-\phi_A-\pi\\
=10\pi
$$ 
where the second equality used Gauss-Bonnet to see that
$$
2\pi=\int_A K_\Sigma+ \pi-\phi_A=\int_B K_\Sigma+ \pi-\phi_B=\int_C K_\Sigma+ \pi-\phi_C.
$$
This is also obviously impossible (I'm a little worried I because I didn't use positive curvature in this case). 
A: Here is a sketch of proof that there is no geodesic with self-intersections as on the second diagram.
Assume a convex surface $\Sigma$ with such geodesic exists;
suppose that arcs and angles are labeled by their lengths.

Apply Gauss--Bonnet formula to show that
$$2\cdot\alpha<\beta+\gamma$$
and
$$2\cdot\beta+2\cdot \gamma<\pi+\alpha.$$
Conclude that $\alpha <\tfrac \pi 3$.
Consider the part of geodesic without arc $a$.
Pass to its convex hull;
denote its surface by $\Sigma'$.
Note that $\Sigma'$ is divided by the curve into 4 parts, one pentagon and three monogons.
Each of these pieces can be developed in the plane, moreover the resulting figure is convex.

Consider the plane figure that corresponds to the pentagon.
Its sides are formed by convex curves with marked lengths, the angles of the pentagon are marked as well.
It remains to use inequalities on angles to show that there is no pentagon with these properties.
Postscript. A complete proof is given in my note "Self-crossing geodesics".
