Point2D pe = p[n - 1];
Point2D p1 = p[1];
Point2D p2 = p[n - 2];
if (lineStyle == GraphConstants.STYLE_BEZIER && n > 2) {
bezier = new Bezier(p);
p2 = bezier.getPoint(bezier.getPointCount() - 1);
} else if (lineStyle == GraphConstants.STYLE_SPLINE && n > 2) {
spline = new Spline2D(p);
double[] point = spline.getPoint(0.9875);
// Extrapolate p2 away from the end point, pe, to avoid integer