AddPoints
With this setting, the user can specify two additional points which are then processed when estimating the derivative at the segment boundaries.
- stPStart: A point that must lie before P[0], i.e. stPStart.X < P[0].X
- stPEnd: A point that must lie after P[n], i.e. stPEnd.X > P[n].X
This results in the following derivatives at the margins:
y'(P[0].X) = (P[1].Y - stPStart.Y) / (P[1].X - stPStart.X])
(gradient in P[0] = gradient of the straight line through stPStart and P[1])
y'(P[n].X) = (stPEnd.Y - P[n-1].Y) / (stPEnd.X - P[n-1].X])
(gradient in P[n] = gradient of the straight line through P[n-1] and stPEnd)
The following figure illustrates the procedure:

