p = (Point) points.get(i);
x[i] = p.x;
y[i] = p.y;
}
NonUniformInterpolation nx = new NonUniformInterpolation(s, x);
NonUniformInterpolation ny = new NonUniformInterpolation(s, y);
double step = s[s.length - 1] / s.length; // average distance between points
double xi[] = new double[vectorLength];
double yi[] = new double[vectorLength];
double xMin = Double.MAX_VALUE;
double yMin = Double.MAX_VALUE;
double xMax = Double.MIN_VALUE;
double yMax = Double.MIN_VALUE;
double arcLength = 0;
for (int i = 0; i < s.length; i++) {
xi[i + radius] = nx.interpolate(arcLength);
yi[i + radius] = ny.interpolate(arcLength);
if (xi[i + radius] < xMin)
xMin = xi[i + radius];
if (yi[i + radius] < yMin)
yMin = yi[i + radius];