From 6b62a5ee0a6a4e1b4438215c7240f67c51670a07 Mon Sep 17 00:00:00 2001 From: Justin Kunimune Date: Sat, 29 Jun 2024 07:39:47 -0700 Subject: [PATCH] fix Waterman projection bug when I redefined the Waterman projection coordinates (I don't even remember when) to use four-times-larger units, I apparently missed *one* constant, and it was increasing the slope of this line between these two pieces of the Waterman face that was causing the projections at that interface to not line up. goodness, what an asinine bug. good on me for finding it in less than an our of its reporting, tho! --- src/maps/Waterman.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/maps/Waterman.java b/src/maps/Waterman.java index ba982d8..5624b28 100644 --- a/src/maps/Waterman.java +++ b/src/maps/Waterman.java @@ -86,7 +86,7 @@ public class Waterman { longitude = x/linInterp(y, yELD[i-1], yELD[i], dXdL[i-1], dXdL[i]); } else { //the well-behaved part of the last segment? - longitude = x/linInterp(y, yELD[i-1], -2*sqrt(3), dXdL[i-1], dXdL[i]); + longitude = x/linInterp(y, yELD[i-1], -sqrt(3)/2, dXdL[i-1], dXdL[i]); if (longitude > lonDiag) { //the diagonal part of the last segment? double a = dXdL[2]*dXdL[3]*sin15; //surprisingly, the equation becomes quadratic here double b = (dXdL[3]*cos15-dXdL[2])*(y-yELD[2]) - dXdL[3]*sin15*x - dXdL[2]*(dXdL[3]*lonDiag*sin15-yELD[1]);