`public static String makePolygons(String lat_a, String lon_a, String lat_b, String lon_b, Double alt_a, Double alt_b, Integer steps_in_circles) {`

/* How many degrees are in a meter? */

double lat_meter = 1 / (Constants.EARTH_CIRCUMFERENCE_IN_M / 360);

double lon_meter = (1 / Math.cos(Math.toRadians(Double.valueOf(lat_a))) * lat_meter);

/* $steps_in_path is an array of values between 0 (at $from) and 1 (at $to)

First we do that at some fixed fractions of path

*/

//List<Double> pathSteps = new ArrayList<Double>();

List<Double> steps_in_path = new ArrayList<Double>();

steps_in_path.add(0.0);

steps_in_path.add(0.25);

steps_in_path.add(0.4);

//{0, 0.25, 0.4};

double[] taper_steps = new double[]{0.3,1,2,4,7,10,20,40,70,100};

List<Double> temp = new ArrayList<Double> ();

double fromLat = Double.valueOf(lat_a);

double fromLon = Double.valueOf(lon_a);

double toLat = Double.valueOf(lat_b);

double toLon = Double.valueOf(lon_b);

double fromAlt = alt_a;

double toAlt = alt_b;

double dis = PtPMath.distanceUsingGPS(fromLat, fromLon, toLat, toLon, fromAlt, toAlt);

double bear = PtPMath.bearingBetweenTwoPoints(fromLat, fromLon, toLat, toLon);

double wavel = wavelen;

// Then we add some steps set in meters because that looks better at

// the ends of the beam

for (double step : taper_steps) {

steps_in_path.add( step / dis );

}

temp.addAll(steps_in_path);

// Add the reverse of these steps on other side of beam

for (double step : temp) {

steps_in_path.add( 1 - step );

}

// Sort and remove duplicates

steps_in_path.sort(Comparator.naturalOrder());

List<Double> pathStepsNoDupes = new ArrayList<Double>(new LinkedHashSet<>(steps_in_path));

return polygons.toString();

}