I updated the polygon code to work on the new sometimes-inside-out-but-always-closed boundary polygons. I also updated the parser to expect the word "boundary" rather than "border". I also went ahead and tried to simplify the spline code based on the assumption that the nan gradients will never be used.
it's onestly weird to think that I originally wrote all this in an IDE that didn't check these things. there was a *lot* of unused code, as it turns out.
I set it to use the new projection format, where each section has its own inverse raster. it does make the poles better in I and II, but it makes the ends of the tears much worse. I need to keep tweaking, I gess.
I set it up so if the iteration gets stuck in a local minimum, it will terminate and return that local minimum. this seemd to work more or less perfectly a minute ago, but I broke it either by reducing the inverse raster resolution or by refactoring the cosine calculation slitely.
the simple Gauss–Newton with Armije backstep was insufficiently robust, so I implemented LM. it seems to work better, but it's still not good enuff. the step size doesn't turn as much as I would expect when λ goes up. I think next it's time to implement the geodesic acceleration correction term.
I added a backstepping line search to each iteration of my Newton-Raphson solver. it actually gets rid of most of those rifts in Elastic Earth III where the folding was causing Newton-Raphson to have difficulty. but there are still a few spots that are struggling. also, it turns out a few points are still not getting counted in any polygon.
I fixd the polygon so it stops excluding certain regions from the projection. I almost got it rite the last time I updated the polgon algorithm, but I forgot to remove the nearestSegment bit, which makes no sense with the crossings counting tecneke.
the problem was that I was modifying the initial gess rather than copying it, and that gess was getting passd to multiple sections and then ultimately returnd as the anser. now it clones it when it starts the iteratinos and then copies it agen when returning it, so the problem went away.
I also made the cropAtPi checkbox work, which was onestly the thing I was doing in the first place (I had no idea this was the root of the problem). and I removed the projected border because I realized I didn't actually need it to implement cropAtPi
the edges of the mesh are a little crunchy now, which is weird because I thaut I set the termination condition to prevent that, but overall this looks quite good. I hope it's correct.
I made the projection smooth at the antimeridian, because it was bothering me. it looks great now. well, I did also notice that a bunch of points near the poles are going to NaN in the vector mapdesiner now, but that doesn't seem to be related to this change, so I'll deal with it later.
I made an attempt to fix the error messages you get with Elastic II. it didn't work. I'm leaving this change in because I think it will probably be better in some situations regardless of the current errors.
I implemented the simplest possible inverse projection. I did end up converting the raster to cartesian coordinates so that the dateline doesn't get screwd up, but other than that it's very simple. now it's just a question of adding that Newton Raphson layer on top.
because god forbid I have a function name longer than fifteen caracters; no one would read that!
but yeah, I hate past me, so here's a much better function name.
I implemented the Elastic projections! this is just a first pass, so of course there are issues to be worked out. the oceanic one has a few particular longitudes that it won't project, and the gradient calculation seems to be rong near the section edges. I also haven't synckd up the section gradients at seams. overall, tho, I'm surprised how good I got the gradient calculation, and the interpolation in general, on the first try. I also haven't done any of the inverse projection yet, but I intend to do a better job with these ones than I did with Danseiji's inverse projections.
I also did some light refactoring; Meshed -> Danseiji and setParameters -> initialize, and +docstrings, so that accounts for most of the modified files.
I rote a script to automatically convert a bunch of equirectangular projections to dymaxion projections. I had to refactor the other main apps slitely, because they were structured very poorly.
Why did I ever think this was something people wanted? By default, the raster maps should look the same as the vector maps and their analysis. Also pseudocylindrical pole-point projections look really terrible by this default (though that's kind of their fault for being so bad).