For shape analysis, the turn angle function is treated as a discrete function that shifts along the x-axis (normalized length instead of time). The cross-correlation between two discrete functions can be approximated as the sum of absolute differences (SAD) as follows: