79 Commits

Author SHA1 Message Date
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
2e33ee97fd Looks like I just optimized the optimizer
I made MapOptimizer print parameters to a file so it's harder to lose
them and made a few other tweaks for the better.
2017-06-28 21:15:55 -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
jkunimune
3888f53782 Tobler (kind of)!
I implemented the Tobler projection using values from Tobler's paper,
Numerical Approaches to Map Projections and spline interpolation. I used
the apache commons' cubic spline solution, which felt kind of like
cheating, but splines are way more complicated to solve for than I
thought, so I don't feel that bad.
It's also not actually equal-area, so not sure what's up with that. I'll
probably go looking for an iterative solution to try to deal with that.
Either way, this is a great projection.
I also move some methods and classes around.
2017-06-27 09:29:09 -04:00
jkunimune
382eddceb0 So long, Runge's Phenomenon!
I implemented some smarter Robinson projections that are a bit faster
and smoother.
2017-06-25 23:01:34 -04:00
jkunimune
fe1ede6a50 Map enum? I barely know 'em!
I refactored everything (assuming I actually understand what the word
'refactoring' means, which I think I do, but I'm not sure. I'm too lazy
to check). There are fewer duplicate names, corresponding information is
closer together in general, the code has less redundancy, it's easier to
add new map projections, and classes are grouped more effectively and
more logically. I've now switched from using Strings to represent map
projections to using an enum (remember when I was using separate
classes? Wow, that was trash!). I was also going to combine the
MapDesigners and MapAnalyzer with some inheritance type stuff, but I
think that's content for another commit.
2017-06-25 21:36:33 -04:00
Justin Kunimune
4de4542954 Merge branch 'master' of https://github.com/jkunimune15/Map-Projections 2017-06-25 13:30:30 -04:00
jkunimune
1ff29b1405 I've finally made something that's not trash!
My tetrafillet projection is actually kind of good! It's not really
continuous like most of the projections I make, but I like it. I think
it's cool. And it's finally objectively better than Winkel Tripel.
2017-06-25 13:29:19 -04:00
jkunimune
4080a8be6d New Map Projection
I created a new tetrahedral map projection. It's alright, but so far
that pseudocylindrical hyper-ellipse one has been the best.
2017-06-18 09:02:55 -04:00
jkunimune
5d6f1b1d55 Gradient Descent - now with less accuracy!
I added gradient descent to the optimizing program in the hopes of
making it faster, which kind of worked, I suppose. I also made some of
the tolerances smarter on some of the iterative algorithms, and took a
few terms off of the Dixon McLaurin Series. I also have Lee centering
its Taylor Series on points closer to the points, so that's more
accurate at the poles now. And I made Tetragraph have actual numbers
attached to it rather than that 1.1 I had from guess-and check. Oh, and
I got rid of Eliptabola because it was apparently discontinuous or crazy
stiff or something, because gradient descent on it would always diverge
to NaN, and it wasn't that great of a projection, anyhow.
2017-06-11 17:00:39 -04:00
Justin Kunimune
1f3f7a1d8b Create LICENSE.md 2017-06-08 13:16:40 -04:00
Justin Kunimune
0133cab41b Objectively the best conformal projection
The Lee projection is fantastic. I'm so glad I found it. It has a shape
distortion metric of .395! That's better than Peirce Quincuncial!
2017-05-28 14:06:49 -10:00
Justin Kunimune
6853216990 I'm a General! Wheeeeeeeeee!
I implemented the Lee Conformal Projection, and let me tell you, it took
a lot of work. Oh, also, I tried another family of pseudo-azimuthal-ish
projections that just kind of sucked. I think I'm going to try
optimizing some tetrahedral projections next. Hence the Lee projection.
I used a 28th-order McLaurin series for the Lee projection, so it
doesn't actually tesselate perfectly. I think I might have entered a
number wrong, because seriously?! The 28th order with six decimal places
of precision wasn't good enough? Anyway, the series was a suggestion
from Lee himself in the paper that I read on JStor, that I had to make a
JStor account for, because I couldn't get the equations literally
anywhere else on the internet. NGAHHH!
2017-05-27 20:27:38 -10:00
Justin Kunimune
2fcfa325e7 General hyperelliptic things
I generalized my formula to make it easier to add new map projection
families.
2017-05-24 10:56:45 -10:00
Justin Kunimune
2ffe290cb4 My new map projection is... just kind of okay
I implemented and optimized my family of hyperelliptic projections.
They're okay - not overwhelmingly better or worse than Robinson and
Winkel Tripel. They have an invertible and differentiable formula,
though, so in that sense, they already are better.
2017-05-23 21:11:38 -10:00
Justin Kunimune
ef37ec361e Imma lambda-n your face!
The MapOptimizer plots some things now. I rewrote a bunch of MapAnalyzer
to work with functional interfaces instead of Strings in preparation for
creating new parametric map projections that will be defined only with
lambda functions.
2017-05-23 19:08:11 -10:00
Justin Kunimune
ee5811bea8 Just getting started
I started a new Application that will optimize new map projections.
Right now it's just a plot, but soon, it will generate new parametric
map projections and compare them to established ones.
2017-05-23 12:27:09 -10:00
Justin Kunimune
5ea3614291 Better, saveable charts
I made the histograms a bit easier to understand by changing the x axes,
and added a button to save them.
2017-05-22 20:38:43 -10:00
Justin Kunimune
2705378e78 Just use a distribution
I added some nifty histograms to MapAnalyzer that makes it clear how
exactly the distortion is distributed.
2017-05-22 19:43:41 -10:00
Justin Kunimune
90e9913a6a Finished the Robinson Projection
I fixed the Robinson Projection. I just used fewer values for the
interpolation. It's still not perfect - you can see waves of distortion
in the map analyzer where the polynomial interpolationis being wonky -
but it's good enough for now.
I also realized that by my metrics, Robinson is objectively better than
Winkel Tripel. I thought there must be something wrong with my
calculations, but upon closer inspection, I realized it's true. Winkel
Tripel was adopted by NatGeo in 1998 because it "reduces the distortion
of land masses as they near the poles," but in fact, Winkel Tripel makes
the poles look even larger than Robinson does! Furthermore, while shapes
near the poles are slightly better for Winkel Tripel, it severely skews
landmasses near the Prime Meridian. NatGeo is just wrong, and I can
prove it with math!
What's more, I realized that now that I have this robust algorithm, I
can use it to invent more map projections! I can optomize
pseudocylindrical and tetrahedral projections to generate the most
accurate map projections the world has ever seen. This is going to be
fun.
2017-05-21 10:57:20 -10:00
Justin Kunimune
7e8d85d333 Robinson Projection, but Arthur sucks
I made a robinson projection, but if you look extremely closely right
around 45 degrees north, everything is extremely distorted at small
scales. This is because of Runge's phenomenon. Honestly, linear
interpolation would be better than polynomial for this. I don't know
what Arthur Robinson was thinking using Aitken for this. Give me another
commit or so to figure this out.
2017-05-20 10:03:52 -10:00
Justin Kunimune
da2ac57df3 More conic projections
I decided it was time to fill out my collection of conic projections.
Not sure why I never did this before.
2017-05-18 10:42:41 -10:00
Justin Kunimune
24260d432f Correct metrics
I made the metrics actually correct, such that now one can numerically
compare map projections. I think it's pretty neat.
2017-05-17 21:55:35 -10:00
Justin Kunimune
9a4f8cf966 HSB: the one true colorspace
I set it to use HSB instead of RGB. Now, darker areas have more angular
distortion, red areas are compressed, and blue areas are dilated. I also
made some neat graphics.
2017-05-17 15:11:48 -10:00
Justin Kunimune
1fb3088d8e Logarithms are for chumps
I changed the way red scales with distortion to be more logical (it no
longer uses logarithms) and fixed a bug with the progress bars.
2017-05-16 20:53:27 -10:00
Justin Kunimune
7dd3c0cf36 Now with more distortion!
I made it stop throwing NullPointerExceptions, and I got it to measure
angular distortion as well as areular distortion. Angular distortion is
indicated in red.
2017-05-16 19:11:53 -10:00
Justin Kunimune
5a770dd6f0 Just how bad _is_ Mercator?
I started another program to measure the distortion in map projections.
Right now, it only does size distortion, and only works for cylindrical
maps.
2017-05-16 11:35:47 -10:00
jkunimune
a0b860e3ee Actually, everything was upside down
I fixed it.
2017-03-19 12:33:48 -04:00
jkunimune
2165430e59 I've done it.
I finished the tetragraph. Everything works now. Gosh, that was awful.
Why is math so hard. iatshuip iket
2017-03-19 12:01:57 -04:00
jkunimune
43f374e649 After 4 Long Months
So, in studying the original Winkel Tripel equations again yesterday, I
stumbled upon a scientific paper containing the Newton's Method inverse
map-projection solution equations, as well as the partial derivatives of
all the Winkel Tripel projections. After reading it over, incorporating
some of their simplified equations into my code, and then noticing
several glaring problems with my own solution (namely my trash initial
conditions), I finally solved for the inverse of the Winkel Tripel
projection! Feel free to raster it up!
2017-03-18 12:19:53 -04:00
jkunimune
7313d340f8 Spiffy
I spiffed it up a bit.
2017-03-17 20:23:43 -04:00
jkunimune
8bd95137e0 Automatic updates
Because vectorized stuff is so much faster, I eliminated the "Update
Map" button.
2017-03-17 20:10:27 -04:00
jkunimune
3fbec08e92 Complex Numbers? Simple.
I got the complex projections to work.
2017-03-17 19:16:29 -04:00
jkunimune
f861660ebb Nevermind; I just did it myself
The JavaFX thing wouldn't really have worked for me given that I needed
to transform the image, not just display it. I'm still salty I didn't
find out about that sooner. Anyway, I got it all to work besides the
complex number ones. I'll figure those out in a bit. I also haven't
tested saving yet, but I'm sure it will work perfectly on the first try.
2017-03-17 17:50:42 -04:00
jkunimune
a9c84a7881 This code does not work
But I wanted to commit it because I spent a bunch of time on this SVG
parser that apparently already exists in JavaFX.
2017-03-17 17:50:42 -04:00
Justin Kunimune
bb5a192509 Update README.md 2017-01-12 21:04:24 -10:00
Justin Kunimune
71c6e8ac27 Update README.md 2017-01-12 21:02:51 -10:00
jkunimune
6c8f416c51 No Longer Threadbare
I added more Threads for some of the more time-intensive processes. I
also tweaked the GUI a bit and modified a bit of math.
2016-11-27 17:10:38 -05:00
jkunimune
2e479dfbd6 Making Progress
I added a progress bar so you can see just how slow my program is. I
also added jpg image saving, since that apparently works now, renamed
the .jar, and fixed some bugs with image sizes. And look! It actually
looks like an application now!
2016-11-26 15:05:56 -05:00
jkunimune
6569d05ea2 Tweaked the GUI
That. I was going to do progress bar stuff, too, but I'd rather just
play Civ VI.
2016-11-25 22:25:59 -05:00
jkunimune
9d3b318671 Bigger and Better
You can control the size of the map when you save it as an image now.
Yay. It's got it's own little dialog and everything.
2016-11-25 22:09:34 -05:00
jkunimune
ebce52b95d Close enough
I've decided to give up on replicating the AuthaGraph projection. I'm
pretty close to the actual projection, and while mine is not
authagraphic, I think it's more authagraphic than the actual AuthaGraph
projection. Of course, I can't really tell, because I can't find an
AuthaGraph map with Tissot's indicatrices on it.
2016-11-25 14:04:07 -05:00
jkunimune
00c916be24 I made a better map projection!
In attempting to solve for the AuthaGraph projection, I made something
that is, in my personal opinion, better: a compromise tetrahedral
projection! It's not authagraphic (though, technically, neither is
AuthaGraph), but it distorts shape far less than AuthaGraph does. I'll
still try to solve AuthaGraph, maybe even modify it to make it, you
know, authagraphic, but I really like this map projection I came up
with.
2016-11-23 17:26:15 -05:00
jkunimune
2872c49c08 It works!
The AuthaGraph projection is a go! Sure, it doesn't preserve area, and
it looks like garbage, but it looks decent! We'll get there. Probably
tomorrow.
2016-11-22 16:14:46 -05:00
jkunimune
59ee92ce45 I fixed it this time, I swear
Turns out some of those garbage IDL-zero conventions were lurking in my
code. Typical. Cut off one head of the evil conventions hiding in my
code, and two more grow in it's place. Well, I'm almost certain my
conventions are correct now, and am ready to tackle AuthaGraph again.
2016-11-22 13:46:55 -05:00
jkunimune
b095d00ee6 Reinforced the North-Up Convention
So, it turns out that one of the reasons I was having such trouble with
AuthaGraph was that I had a sign convention where south was positive and
the international date line was zero. So, I fixed that, because that was
awful. It should be easier for me to figure out polyhedric projections
now. Mind you, AuthaGraph doesn't work at all right now. It's just not
even close right now. Don't worry - I'll work on that.
2016-11-21 15:39:18 -05:00
Justin Kunimune
8ea1d446d3 Added stuff 2016-11-14 19:55:20 -05:00
jkunimune
cc1ab0b27b Bug fixes
Yep. I'm too lazy to write a more descriptive message.
2016-10-11 19:49:23 -04:00
jkunimune
5858de3dcd I made it worse
I tried to make MapProjections faster, but it didn't work. The GUI looks
nicer now, but a bunch of functionality is gone.

I also did something with wormhole, apparently.
2016-10-09 00:18:41 -04:00