Solution (source code)

= Solution

The two curves produced by $y=0$ are meridians, and meridians of a surface of revolution are geodesics. A boundary circle $x=x_0$ is a geodesic precisely when $f'(x_0)=0$, as follows either from the geodesic equations or from its geodesic curvature
$$
k_g=\frac{|f'(x_0)|}{f(x_0)\sqrt{1+f'(x_0)^2}}.
$$
The circle at $x=2-a$ is geodesic because it joins the cylinder smoothly. At the other boundary,
$$
f'(2+a)=\frac{1-a}{\sqrt{2a-a^2}},
$$
which vanishes exactly when $a=1$. Hence the cut pieces are geodesic polygons only for
$$
\boxed{a=1}.
$$