In reading Section B of the Appendix of Chapter $1$ of Do Carmo's Differential Geometry of Curves and Surfaces, I have a few points of confusion. He writes (summarized):
Let $\alpha : [0, l] \rightarrow \mathbb{R}^2$be a closed plane curve given by $\alpha(s) = (x(s), y(s))$ parametrized by arc length. Let $t$ be the tangent indicatrix (the normalized tangent curve) given by $t(s) = (x'(s), y'(s))$. Let $\theta(s), 0 < \theta(s) < 2 \pi$ be the the angle that $t(s)$ makes with the $x$-axis, that is $x'(s) = \cos \theta(x), y'(s) = \sin \theta(s)$.
Since $\theta(s) = \arctan(\frac{y'(s)}{x'(s)})$, $\theta = \theta(s)$ is locally well defined as a differentiable function and $\frac{dt}{ds} = \frac{d}{ds} (\cos \theta, \sin \theta) = \theta'(-\sin \theta, \cos \theta) = \theta'n$ where $n$ is the normal vector.
This means that $\theta'(s) = k(s)$ and suggests defining a global differentiable function $\theta: [0,l] \rightarrow \mathbb{R}$ by $\theta(s) = \int_{0}^{s} k(s) ds$. Since $\theta' = k = x'y''-x''y' =(\arctan (\frac{y'}{x'}))'$. This global function agrees, up to constants, with the previous locally defined $\theta$. Intuitively, $\theta(s)$ measures the total rotation of the tangent vector, that is, the total angle described by the point $t(s)$ on the tangent indicatrix, as we run the curve from $0$ to $s$. Since $\alpha$ is closed, this angle is an integer multiple, $I$, of $2 \pi$; that is $\int_{0}^{l} k(s)ds = \theta(l) - \theta(0) = 2 \pi I$, where $I$ is the rotation index.
My questions are:
I do not understand the statement "$\theta(s)$ measures the total rotation of the tangent vector from $0$ to $s$", to me it seems like it is simply integrating the curvature over some interval, and I cannot seem to connect these two concepts.
It seems to me that $\theta(l)=\theta(0)$, and so I am not sure why this implies that the rotation index could be anything other than $0$. I am familiar with the concept from computer graphics of the winding number of a curve centered around some point, the idea being we want to know how many times the curve spins around (clockwise or anti-clockwise) some point, but I can't connect this to the equation described.