dtheta#

Spline.dtheta(t)#

Helper function for calculating the winding number.

dtheta is the derivative of the polar coordinate \(\theta(t)\)

\[\theta(t) = arctan \left( \frac{y(t)}{x(t)} \right)\]

Differentiation yields:

\[\frac{d \theta}{dt} = \frac{1}{r^2} \left( x\frac{dy}{dt} - y\frac{dx}{dt} \right) \text{, where } r^2 = x^2 + y^2\]