fix AuthaGraph slider

a few commits ago, I decided to remove the power slider from the IMAGO (AuthaGraph) projection, since the original AuthaGraph wasn't technically parametirizable, and I figured I already had "TetraPower", which was the same thing but explicitly parameterized.  there were two problems with this.  one was that I forgot to remove the parameter, so the "Power" slider was still there it just didn't do anything.  the twoth was that the "TetraPower" projection differed from AuthaGraph in arrangement as well as parameterization, so I can easily imagine someone wanting to tune the scaling on the AuthaGraph projection but not being satisfied with the alternate version.  plus, "TetraPower" was buried in the "Created by Justin" section of the map projections so I wouldn't blame people for not noticing it.

thus, rather than simply deleting the slider, which would be the more straitforward fix here, I'm erring on the side of not removing functionality and putting the parameterization back on IMAGO, while also rebranding "TetraPower" as an alternate arrangement of IMAGO/AuthaGraph.
This commit is contained in:
Justin Kunimune 2023-12-21 21:34:58 -10:00
parent 98a22a7304
commit 3ffb340f31
4 changed files with 16 additions and 13 deletions

View File

@ -143,8 +143,9 @@ public abstract class MapApplication extends Application {
{ Azimuthal.EQUAL_AREA, Azimuthal.POLAR, Azimuthal.GNOMONIC, Azimuthal.MAGNIFIER,
Azimuthal.ORTHOGRAPHIC, Azimuthal.PERSPECTIVE, Azimuthal.STEREOGRAPHIC },
{ Conic.ALBERS, Misc.BRAUN_CONIC, Conic.LAMBERT, Conic.EQUIDISTANT },
{ Polyhedral.AUTHAGRAPH, Polyhedral.LEE_TETRAHEDRAL_RECTANGULAR,
Polyhedral.LEE_TETRAHEDRAL_TRIANGULAR, Polyhedral.VAN_LEEUWEN },
{ Polyhedral.AUTHAGRAPH, Polyhedral.AUTHAGRAPH_ALT,
Polyhedral.LEE_TETRAHEDRAL_RECTANGULAR, Polyhedral.LEE_TETRAHEDRAL_TRIANGULAR,
Polyhedral.VAN_LEEUWEN },
{ Octahedral.CONFORMAL_CAHILL_BUTTERFLY, Octahedral.CONFORMAL_CAHILL_OCTANT,
Octahedral.CAHILL_CONCIALDI, Octahedral.KEYES_STANDARD, Octahedral.KEYES_BUTTERFLY,
Octahedral.KEYES_SIMPLIFIED, Octahedral.KEYES_OCTANT, Polyhedral.DYMAXION,
@ -164,7 +165,7 @@ public abstract class MapApplication extends Application {
{ Elastic.ELASTIC_I, Elastic.ELASTIC_II, Elastic.ELASTIC_III,
Danseiji.DANSEIJI_N, Danseiji.DANSEIJI_I, Danseiji.DANSEIJI_II, Danseiji.DANSEIJI_III,
Danseiji.DANSEIJI_IV, Danseiji.DANSEIJI_V, Danseiji.DANSEIJI_VI,
Polyhedral.AUTHAPOWER, Polyhedral.ACTUAUTHAGRAPH, Polyhedral.TETRAGRAPH } };
Polyhedral.ACTUAUTHAGRAPH, Polyhedral.TETRAGRAPH } };
private static final String[] ASPECT_NAMES = {
"Normal", "Transverse", "Atlantis", "Jerusalem", "Point Nemo", "Longest Line",

View File

@ -72,7 +72,7 @@ public class MapExplainer extends Application {
Octahedral.CAHILL_CONCIALDI, Misc.PEIRCE_QUINCUNCIAL.transverse(), Snyder.GS50,
Misc.TWO_POINT_EQUIDISTANT, HammerRetroazimuthal.FULL, Misc.FLAT_EARTH },
{Danseiji.DANSEIJI_N, Danseiji.DANSEIJI_IV, Danseiji.DANSEIJI_V, Polyhedral.TETRAGRAPH,
Polyhedral.AUTHAPOWER, Polyhedral.ACTUAUTHAGRAPH } };
Polyhedral.AUTHAGRAPH_ALT, Polyhedral.ACTUAUTHAGRAPH } };
public static void main(String[] args) {

View File

@ -66,7 +66,7 @@ public class MapOptimizer extends Application {
ArbitraryPseudocylindrical.ROBINSON, Cylindrical.PLATE_CARREE, Cylindrical.GALL_STEREOGRAPHIC,
Misc.PEIRCE_QUINCUNCIAL };
private static final Projection[] PROJECTIONS_TO_OPTIMIZE = { Tobler.TOBLER,
WinkelTripel.WINKEL_TRIPEL, Polyhedral.AUTHAPOWER };
WinkelTripel.WINKEL_TRIPEL, Polyhedral.AUTHAGRAPH_ALT};
private static final double[] WEIGHTS = { 0., .125, .25, .375, .5, .625, .75, .875, 1. };
private static final int NUM_BRUTE_FORCE = 30;
private static final int NUM_BFGS_ITERATE = 7;

View File

@ -120,7 +120,11 @@ public class Polyhedral {
new String[] {"Power"}, new double[][] {{.5,1,.68}}) {
private final double[] POLE = {toRadians(77), toRadians(143), toRadians(17)};
private final double k = .68;
@Override
public void initialize(double... params) {
AUTHAGRAPH_ALT.initialize(params[0]);
}
@Override
public double[] project(double lat, double lon) { //apply a pole shift to AuthaGraph
@ -134,21 +138,19 @@ public class Polyhedral {
}
public double[] faceProject(double lat, double lon) {
AUTHAPOWER.initialize(k);
return AUTHAPOWER.faceProject(lat, lon);
return AUTHAGRAPH_ALT.faceProject(lat, lon);
}
public double[] faceInverse(double r, double th) {
AUTHAPOWER.initialize(k);
return AUTHAPOWER.faceInverse(r, th);
return AUTHAGRAPH_ALT.faceInverse(r, th);
}
};
public static final PolyhedralProjection AUTHAPOWER = new PolyhedralProjection(
"TetraPower", "A parametrised, simplified version of my AuthaGraph approximation",
public static final PolyhedralProjection AUTHAGRAPH_ALT = new PolyhedralProjection(
"IMAGO (simplified)", "An approximation of the AuthaGraph projection, rearranged to an alternate layout that's more north-up",
true, true, false, Polyhedron.TETRAHEDRON_WIDE_VERTEX, Property.COMPROMISE, 4,
new String[] {"Power"}, new double[][] {{.5,1,.6}}) {
new String[] {"Power"}, new double[][] {{.5,1,.68}}) {
private double k;