Skip to content

CurvatureMode

Ronja Schnur edited this page Jan 16, 2023 · 3 revisions

 

pygranite.CurvatureMode.Off

No curvature is computed at all.

 

pygranite.CurvatureMode.TotalCurvature

TotalCurvature is computed in the standard fashion using the second derivative.

Each individual curvature value is given by: $$\kappa(t) = \frac{\mid r'(t) \times r''(t) \mid}{\mid r'(t) \mid^3}$$

Leading to the following summation: $$\kappa_{total} = \sum_{t \in T} \frac{\kappa(t) \cdot \left( \mid p(t) - p(t - \Delta t) \mid + \mid p(t + \Delta t) - p(t) \mid \right)}{2} \approx \int \kappa(s) \text{d} s$$ where $T := { \Delta t, 2 \cdot \Delta t, \ldots, (n - 2) \cdot \Delta t }$ and $n$ denoting the number of trajectory points.

 

pygranite.CurvatureMode.FastTotalCurvature

Total curvature is computed using the angle and method.

The total curvature is approximated using the angle between two consecutive trajectory points: $$\kappa_{total} \approx \sum_{t \in T} \angle (p(t) - p(t - \Delta t)) (p(t + \Delta t) - p(t)) $$

This version is in theory faster than the other one.

 

pygranite.CurvatureMode.IndividualAndTotalCurvature

Total curvature and curvature values for each trajectory point are computed. (See TotalCurvature for an explaination of the math)