double lenToEnd = end.distanceToXZ(start);
double heightDiff = end.y - start.y;
double stepSize = lenToEnd / INTERPOLATION_STEPS;
VectorXZ dir = end.xz().subtract(start.xz()).normalize();
List<VectorXYZ> path = new ArrayList<VectorXYZ>();
for (int x = 0; x <= INTERPOLATION_STEPS; x++) {
double ratio = x / INTERPOLATION_STEPS;
// distance from start to position x
double dx = stepSize * x;
// use a simple parabola between two towers
double height = (1 - Math.pow(2.0*(ratio - 0.5), 2)) * -SLACK_SPAN;
// add a linear function to account for different tower/terrain heights
height += ratio * heightDiff;
path.add(start.add(dir.mult(dx)).add(0, height, 0));
}
List<List<VectorXYZ>> strips = createShapeExtrusionAlong(
powerlineShape, path,
nCopies(path.size(), VectorXYZ.Y_UNIT));