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!
This commit is contained in:
Justin Kunimune 2024-06-29 07:39:47 -07:00
parent ce7ddeb028
commit 6b62a5ee0a

View File

@ -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]);