Modify distributeTimeStamps to use a similar triangle method combined with line.extrapolate() instead of trigonometric extrapolation.