The curvature of a curve describes how quickly the curve changes direction at a point. Formally it's defined as the magnitude of the rate of change of the unit tangent vector with respect to arc length. The curvature of a curve is defined as
If the curve is already parameterized by arc length the curvature can simply be calculated as
When
When the derivative of