31 Commits

Author SHA1 Message Date
Justin Kunimune
00a3f2a25e Revert "Angles vs factors"
This reverts commit ed297dbd079f3cc1ce93cd3aeb2cd98a60be7351.
2018-01-24 19:05:50 -10:00
Justin Kunimune
ed297dbd07 Angles vs factors
I changed my shape distortion metric to be max angle displacement instead of stretch factor in decibels, hoping it would weigh moderate distortion higher and severe distortion lower. It didn't really do anything. I think I'll just set it back to how it was, because I liked it that way.
2018-01-24 18:48:18 -10:00
Justin Kunimune
3ff09d1ada Not bad, if I do say so myself
I finished the inverse of my new Equahedral map projection. Numerically,
it looks great, but to be completely honest, I'm dubious. I'm strongly
considering changing my average shape distortion function, because it's
giving a quite good score to Equahedral, even though Equahedral distorts
pretty much everything about the same amount, which I honestly think
should score it lower. It looks like it does shape better than Winkel
Tripel, which I just don't believe. So we'll see.
2018-01-24 13:42:58 -10:00
Justin Kunimune
d09d3db53c My best one yet
I've invented another map projection. Well, two, technically. They are
both equal-area tetrahedrals of the same form. I scrapped the old
Equahedral and replaced it with projections having interruptions more
like Cahill's sinuses than the arbitrary holes I put in the other one.
This drastically reduces the maximum distortion and conforms better to
the sphere, without taking up too much more area. I couldn't decide
exactly how to format the meridians (they needed a joint somewhere, but
where?), so I did it two ways so I could compare them. I'll get rid of
the one that I don't like as much, which seems to be "fold". That one is
a little bit more mathematically elegant, but just distorts the vertexal
regions more.
2018-01-24 11:19:47 -10:00
Justin Kunimune
69c61be027 You've heard of FaceMash. Get ready for MapMash!
I added a rating system! All maps have a rating 0-4, now. Since this
rating is completely subjective, I doubt I'll put it into the main
program. I haven't actually decided what to do with it yet, but I like
having it. The criteria I used were fairly straightforward:

0 - Terrible. Do not use. There are objectively better alternatives. I
hate it.
1 - Bad. Could be worse, but using this projection reflects a lack of
thought or understanding.
2 - Okay. I can't fault anyone for using it. It's not the best, but it
is fine. Good for at least some situations.
3 - Good. People who use this know what's up.
4 - Fantastic. One of the best. There can only be four.

These ratings reflect how the projection is most often used, not
necessarily how it ought to be used.

I also now measure average distortion in Decibels, because I like the
zeroth order of magnitude better than the negative first order of
magnitude.
2018-01-22 11:58:52 -10:00
Justin Kunimune
fb6a6f970d Fine! Select the headers! See if I care!
I changed up the projection selection dialog a bit to have what I think
is slightly more intuitive behaviour.
2018-01-20 21:59:32 -10:00
Justin Kunimune
15089ee166 We should take the error and push it somewhere else!
I drastically reduced the error in distortion calculations of some of my map projections by strategically slightly shifting my sampling points around so that they are far less likely to hit seams. I don't like it as a solution, but it works way better than the other thing I tried that was supposed to automatically detect seams.
I also changed MapAnalyzer to have more bins for the histograms, so that each bin matches to one contour level.
2018-01-20 21:33:52 -10:00
Justin Kunimune
5ef9f5eed5 So many faces!
I cleaned up my Polyhedral code substantially in preparation for Dymaxion. It was kind of a mess. I moved a bunch of periodicity code out of the projections themselves and into the Configurations, made the Configurations more efficient and correct (particularly the OOB stuff), and fixed a big hole in my obliquifySphc that was manifesting in a nasty way in my Lee. I also scoured Lee's paper and finally got the exact (well, to nine sig figs) value of the size of the triangle. I also made Lee slightly faster, though I have yet to look into that "Knuth" algorithm Snyder was talking about. Also, as it turns out, Lee has reverted to reporting an average shape distortion of 0.011, so I'll have to look into that at some point. I think it's a tetrahedral thing.
2018-01-19 11:30:55 -10:00
Justin Kunimune
d5a792cdb7 Got a dead lawn but to lazy to do anything?
Hire a Water Man!

Get it? Waterman?

I implemented the Waterman projection. Well, mostly. The raster part doesn't actually work for what would correspond to Gene Keyes's "equatorial supple zone". The math got too complicated, so I want to push what I have. It also doesn't detatch Antarctica, but I probably just won't do that; I think it detracts from the value of the map.
I renamed Tetrahedral to Polyhedral in the process, because I had originally intended to use that framework before I decided Waterman needed its own class. I still might put Dymaxion in Polyhedral.
I also fixed a bug with Cahill-Keyes that was cutting off the top and bottom and removed the Butterfly variant of Cahill-Keyes.
2018-01-18 10:56:39 -10:00
Justin Kunimune
05758dd23a Why can't I stop making maps?
Last week, I thought Cahill-Keyes would be my final map projection. Now
I have that, two new pseudocylindricals, and the beginnings of a
Dymaxion derivation in my notebook. I just can't stop! Anyway, I threw
in Natural Earth, because I like Tom Patterson's work (as you may know,
two of my input rasters were made by him), and Karvayaganirsksyviyh the
twelfth, because of that one reference in XKCD and its slightly
persuasive Wikipedia page. Neither was too hard to implement, though I
did make Robinson share a class with the very similar Natural Earth.
I also redid Tissot like I said I would. I relegated the other one to
the side to be used by scripts only. I just like a lot more indicatrices
on my map than Eric Gaba. I need to update Tissot.png to have colors
consistent with Tissot.svg, but I'll do that later. I was going to do
that today before I got distracted finding out all of my Antarcticas
were wrong.
2018-01-15 13:21:46 -10:00
Justin Kunimune
c83c71bc23 In its original form
I changed up a few map projections to look more like they did when they were first published. I added a triangular version of Lee, I changed AuthaGraph to have the aspect built in, and I fixed all of the ones without aspects to actually not have aspects (there was a bug there that I fixed).
I also cleaned up SVGMap a bit to try to make it work better with this great Tissot's indicatrices image I found, but the image was too messy, and I couldn't make it work.
2018-01-13 17:17:03 -10:00
Justin Kunimune
cae7a8a64c I knew Keyes was good, but... wow.
I can't express in text how impressed I am by Gene Keyes. Perhaps that's
unnecessary. Perhaps it's just the interruption that's making it look so
good. But either way, wow! It's such a good projection. I didn't want to
pass judgement until I had gotten a complete MapAnalyzer color plot, in
case my eyes deceived me. The results are in, and this is a magnificent
map, second only to Lemons (I found out the real word for those is
"Gores", but I'm going to keep using "Lemons"). Cahill-Keyes is complete
and ready for production!
2018-01-10 19:22:18 -10:00
Justin Kunimune
da163a45bc All of the projections!
I added a nifty projection selection dialog so that the user now has
access to every projection I have programmed, while the combobox list is
now shorter. It was more difficult than I anticipated, but it works and
looks great!
2018-01-02 11:04:40 -10:00
Justin Kunimune
22cb631818 Over the Cahill
I've finished Cahill-Keyes! It took a lot of reading, a lot of geometry,
and a lot of if statements. But now it's perfect. Now all I need is an
inverse projection.
2017-12-28 22:02:13 -10:00
Justin Kunimune
910ec37911 Ready for Release
I fixed up some things, changing Tetrahedral aspect preset to not slice
up Antarctica as much and Longest Line to have Australia at the top
again (I just like it better that way. I'm not sure why I ever did it
differently.). Then I rebuilt it. Fun fact: JDK 9 doesn't work. I had to
go back and find JDK 8 to make it actually compile.
I also revised my ReadMe to reflect a few changes and made some new
images. It's a wild time.
2017-11-26 11:46:43 -05:00
Justin Kunimune
f37b266fdf Tetrachamfer? Tobler? Who needs 'em?
I inverted a new projection to fill my "Equahedral" slot. It's what I
had before as "ActuAuthaGraph", but it cuts out the singularities, much
like Tetrachamfer. It works well for Albers, so I figured it would here,
as well. And I was right! With a minimal amount of interruption (it's
not even interruption, in a strictly technical sense), I have created an
authagraphic projection that is far better than any other I've seen. It
even has those nice little holes I like for inserting tiny orthographic
projections.
I also learned that Tetrahedral Projections produce some serious error
in my average distortion metrics. Maybe it's because of the
discontinuity; I'm not sure. I might look into it later, but for now,
I've mostly fixed the problem by lowering the threshold for "outlier" in
my size distortion metric from exp(25) to exp(15). As it turns out,
Tetrahedral projections are now way better than I though they were. This
threshold change somehow threw my Tobler off, so I had to up its
precision by a factor of two. That one's still lightning-fast, though.
It is technically O(1), after all.
Also, given how good EquaHedral is, I've deleted Hyperellipower,
TetraChamfer, and TetraFillet, and removed TetraGraph from most apps.
EquaHedral is just so good! And the AuthaPower generalisation I made for
AuthaGraph just fulfills all of my compromise needs! Tetrahedrons are
the future!
2017-11-25 11:35:48 -05:00
Justin Kunimune
66ae877df2 The secrets of the AuthaGraph uncovered!
I've successfully reverse-engineered the AuthaGraph! My version is not
perfect, but it's pretty darn close. Those fools at AuthaGraph Inc.
thought their secrets were safe from me. How wrong they were!
Also included is an authagraphic version of AuthaGraph and a
parametrised version.
2017-11-23 23:03:36 -05:00
Justin Kunimune
6b3bc764e4 Better tetrahedral projections
I made tetrahedral projections a bit more intuitively coded while
figeting with the equal area one.
2017-11-21 23:01:08 -05:00
Justin Kunimune
0082af3ff5 I underestimated the pointiness of triangles
As it turns out, they are quite pointy. And creating an authagraphic
tetrahedral projection that has to shove landmasses into the pointy
corners doesn't work very well. Oh, well. I did some fun calculus to
make it work. I don't know how AuthaGraph does it. Probably by not being
authagraphic and lying to its followers. I'll probably make something
interrupted now.
2017-11-21 19:23:11 -05:00
Justin Kunimune
69984ce9a7 Consider it caught
I'm ready to release. I thought this commit would be some minor spelling fixes, but I ended up having to recompile the jars and exes, fix a (surprisingly minor) bug in Math2.stddev, regenerate the plot, make MapDesignerRaster's maps have more reasonable dimensions, and improve comments slightly.
I also changed the version to 3.1 because I've decided 3.0 was what I had at the beginning of 2017.
2017-09-02 21:03:34 -04:00
Justin Kunimune
5207b1999c Final Deliverables
I updated all my images and html based on the new parameters.
2017-08-28 16:11:51 -10:00
Justin Kunimune
97026c233c Gradient Descent Sucks
I spent a while tweaking my optimization algorithm and trying to figure out why it sucks so much (i.e. why it keeps giving me trash maps), and I think I figured it out. Gradient descent sucks. At least, with this system it does. The functions are too stiff, the numbers too variable in orders of magnitude. Tobler never reaches a good set of parameters because one of its parameters uses degrees instead of radians, so it descends 3,000 times slower. How messed up is that?
I did some research, and I think Broyden-Fletcher-Goldfarb-Shanno is what I want to use. I read up on it and know exactly how I would implement it, if I actually cared that much.
As fun as BFGS would be to implement and use, I go back to school tomorrow and want this done. To that end, I added a slight modification to my gradient descent to deal with the degrees-radians issue and increased the number of iterations drastically. I tried doing a basic Newton's method with the derivative, but I did it one-dimensionally, so it sucked. I just really didn't want to deal with matrices. So here we are. Good enough, I say.
2017-08-28 15:12:09 -10:00
Justin Kunimune
dcf5fa98c1 It was mostly crazy.
So, representing projcetions as classes was kind of a horrible idea and
also impossible. That's okay. I still implemented two of the things I
wanted to implement: storing projections as variables such that I can
distribute them among several (like, fifteen), and a formal system
 for a long time ive had to poop
 i think i should get that looked at
 hahahahahahaha just kidding i love being constapated
for processing parameters. Al6so, Wink7el Tripel is tot9ally broe5kn. i
9think it mig3ht be an 7issue with N5ewton Raph9son Appro1ximation. I'll
look i6nto that l8r.
2017-08-14 14:26:54 -04:00
jkunimune
8c60d261aa Just call me the Master of Cone
I've got the equidistant conic and Albers down. Now all I have to do is
make Lambert's conformal conic lose its whitespace. I'm so close!
As with equidistant conic, the code for Albers looks completely hideous.
I figured I would just go ahead and continue the theme. There's a
non-negligible chance Lambert CC will soon become uglier, as well. Thank
goodness for Eclipse's ability to hide blocks of code.
2017-07-20 22:33:20 -04:00
jkunimune
bf2bd735dd Has this one really not been invented yet?
It's a pseudoazimuthal projection based on stereographic. I call it
"pseudostereographic". It's the next logical step after Aitoff and
Hammer. It's not that it's a particularly good map projection -
obviously scaling the longitudes ruins the conformal properties, and it
comes out as a little more progressive than Plate Caree, just barely
more authagraphic than Lee. It's so obvious, though, that surely someone
must have thought of this already.
2017-07-19 22:36:38 -04:00
jkunimune
213da03a3a Another One Bites the Dust
Conformal conic is done. I'll admit, there's some room for improvement
in the way inverse handles r0 - you sometimes get awkward blank space on
one side of the map. This is certainly good enough to move forward,
though. I also added Miller, because I remember liking that one at one
point. Not sure why.
2017-07-15 22:48:17 -04:00
Justin Kunimune
8f9af45190 Everything is broken
I got the labels to move around when you resize the graph, and changed
up my distortion metrics slightly. I was, like, yeah. This is good. Now
I can optimize my Tobler projection. And then I found out that the map
optimizer was assigning Tobler size distortions of .4! I'm just so
confused. So that's completely broken. I suppose once I figure this out,
it might help to explain why Tetrapower is so bad.
2017-07-10 09:29:45 -04:00
jkunimune
d38557f1e2 Assigning labels
The map plotter works... kind of. It doesn't update if you try to resize
it, and all the the text is slightly too high... but the overlay is
there!
2017-07-08 22:59:43 -04:00
jkunimune
e9e9721598 Whew!
That was... a lot. I decided to put some inheritance into the project,
and what a rabbit hole that turned out to be!
Huh. I think that may be the first time I've ever actually used an
"exclamatory statement". What a useless structure that is!
Anyway, both MapDesigners now inherit from the same abstract super
class. Eventually, I'll get MapAnalyzer to link to that, too. I also
changed a whole lot of other things, and started inserting parametric
map capacities. That should be a fun GUI thing to figure out. I also
changed a lot of other things that I can't remember off the top of my
head. I've just been dragging chunks of code around and swimming in
errors for the past week.
2017-07-01 20:55:46 -04:00
jkunimune
d5503de6ca I found a closed form solution for the inverse of Aitoff
I had been under the impression that there wasn't one. If so, I'm
apparently a cartographic genius. More likely I was just mislead by that
2002 Turkish paper.
2017-06-27 22:51:35 -04:00
jkunimune
6d9b9fa4a0 I don't trust these map projections; I think they're plotting something.
I made a new program to plot existing map projections with labels (I
have yet to actually add the labels). I also moved some things around,
implemented Aitoff, and found a bug in my Newton-Raphson Approximation
that was making it converge slower (how it still managed to converge to
the right value is totally beyond me).
2017-06-27 22:15:30 -04:00