72 Commits

Author SHA1 Message Date
Justin Kunimune
fd87346a95 Minor touch-ups
I noticed some things that bothered me about my GUI, which I adjusted.
2018-01-20 17:41:00 -10:00
Justin Kunimune
9dfc72f4b8 Exacto
I got the equations perfect. The Dymaxion projection is complete. And by far my slowest projection.
2018-01-20 17:40:32 -10:00
Justin Kunimune
2687fea6a4 Don't be fooled by its good looks
I started on my Dymaxion implementation. I got the aspect and the layout down, after quite a bit of trial and error. I altered the Polyhedral code to suit an icosahedral mesh. Now I just need the face projection. Honestly, though, the approximation to the face projection that I'm using now is really good. Like, I can't visually tell the difference. But it's not done until its exact.
2018-01-19 22:38:35 -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
55f8d4aae1 Well, here you go
I finished Waterman. It actually compares fairly well with Cahill-Keyes, being not as good at shape preservation but actually slightly better with area. Wow, though, those equatorial regions were killer!
2018-01-18 14:40:29 -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
35538a029c What do you call a rapidly flashing map projection?
A Strebe projection!

I implemented the Strebe 1995 projection, and Eckert IV, since it was a prerequisite. What a weird map!
I also reorganised my other maps by adding more specific geometry types, putting the full list in alphabetical order, and standardising every instance of Newton-Raphson approximation to actually call NumericalAnalysis.newtonRaphsonApproximation().
2018-01-11 21:14:11 -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
fc20d5071a Some next-level stuff
I made a better approximation of Cahill-Keyes. It's getting there; be
patient.
2018-01-10 17:47:09 -10:00
Justin Kunimune
7d84f4a1a3 Seyek-Llihac
I started on the inverse of Cahill-Keyes. I just have the arrangement
done for now; I'll do the specific projection equations next.
2018-01-09 21:15:35 -10:00
Justin Kunimune
cfa31402a4 Meridians and parallels intertwined like wild vines
I added a graticule to raster maps! This took quite a while to complete, and it still has major issues. Namely, those annoying horizontal lines where it crosses from one side of the map to the other. I've contemplated several methods for dealing with that, and I'm starting to like an intelligent system that knows where the interruptions are and breaks lines that cross it. I don't have the details worked out. This also took a while, so I might take a break from that and finally get around to doing the inverse projection for Cahill-Keyes.
2018-01-09 17:02:49 -10:00
Justin Kunimune
d22a6773c7 A perfect fit
I altered the SVG saving code so that it actually properly fits the map to the artboard. While I was at it, I altered a few .project() methods that were returning NaN, which was messing up the SVG.
2018-01-09 10:14:57 -10:00
Justin Kunimune
8c9f2cbbac Get cut out of the picture
I added an option to remove the unnecessary stuff on the side of the map. It makes some pretty cool looking stuff. Not as good stuff, in my opinion, since it implies that the world has hard edges, but it works real well for the map analyser, where it prevents the distorted margins from distracting from the less distorted part that actually matters.
2018-01-04 21:03:42 -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
91b71314f9 The only part of the map that matters
I implemented Snyder's "GS50" projection! The USA is nearly distortion
free. The rest of the world can go screw itself.
2017-12-29 20:59:55 -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
4fe7a76e2e I'm a beautiful butterfly!
I implemented a first pass at octohedral map projections. I have
isolated the complicated projection part to a method I have yet to
write, but I've found a great resource at Gene Keyes's website that goes
into much detail on how exactly to produce the Cahill-Keyes projectios.
I would have gone with Waterman, since it's marginally more popular, but
this one is way better documented, and it's newer so presumably better.
I threw in a butterfly and "M" arrangement.
2017-12-22 18:11:04 -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
223342cd16 Notation matters
I changed all the descriptions to end with periods. I also fixed a minor bug with conic projections not properly degenerating to cylindricals and made the MapAnalyzer display nicer things (it really isn't that slow. Maybe my computer is just faster now.).
2017-11-21 17:39:29 -05:00
Justin Kunimune
35e0dacf0f I'm back - and bigger than ever!
I changed Projection to define "width" and "height" attributes rather than an "aspectRatio" attribute. I'm not sure if it saves any code, and it's definitely less efficient this way, bit it makes the math parts of the code a whole lot more readable and more consise. It also makes my conics work a little bit better.
2017-11-21 17:23:58 -05:00
Justin Kunimune
cd99cd716c Better than Atlantis
I added a new aspect, roughly based on the "Atlantis Projection", which is an oblicque Mollweide projection, except that I recently discovered that that one is transverse, not completely oblique. What is it with this aversion the world has to oblique projections? Anyway, I came up with a slightly better one in a similar location.
2017-10-04 17:10:59 -04: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
c1eb163af6 Hah! Aitoff _does_ have an inverse solution!
I tweaked MapExplainer to be a little bit better, corrected some minor issues with the Projection metadata, added real descriptions to my custom parameterised projections, and fixed a critical bug with WinkelTripel's inverse solution.
2017-08-28 19:43:54 -10: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
abc3bd80f1 Where credit is due
I went through my images, recorded their sources if I could find them,
and replaced them with certifieably open-source alternatives if not.
I also fixed a minor issue with saving.
2017-08-27 15:40:49 -10:00
Justin Kunimune
3dcb0b77d4 Now accepting all (most) input
I refined my SVG parser to be open to more commands and such. It still
does not take kindly to arcs, but it's pretty darn good. I tried it out
with some new maps, and it looks great.
2017-08-26 14:39:07 -10:00
Justin Kunimune
66b27d03ec Say something I'm breaking up on you
I made drawn lines break when they get too long again, and I fixed some
issues with Pierce Quincuncial and Guyou. Speaking of which, I removed
Guyou from my active projection list. It used to be my favourite
projection, but now that I've found Lee, it's just obsolete. Pierce
Quincuncial is a bit obsolete in light of that too, but at least that
one is somewhat known; I don't need it as well as Guyou.
I was also fooling around with Lee and found a way better aspect for
tetrahedral maps. I have no idea how I missed it before.
2017-08-26 11:00:45 -10:00
Justin Kunimune
40201f6f46 Parsing, for real this time
I implemented more advanced SVG parsing and manipulation. It's somewhat
slower now, I think because I changed the way it skips vertices to save
time, but it was necessary to enable slightly more advanced SVG reading
(which I have yet to test). All the projections work, though. I also
changed my coordinate system. I also broke the bit where it does not
draw long lines.
2017-08-25 21:06:56 -10:00
Justin Kunimune
3df41f52db Do you know who I am?!
I added the forward solution to the Lemons projection, which is
currently a bit wrong, but I'm going to replace it with a Cassini type
thing in a bit, anyway.
I also spiffed up the comments and changed how Antipode works slightly.
2017-08-20 11:48:37 -10:00
Justin Kunimune
2e464bef0c Capitalisation makes things look nicer
I capitalised all my filenames, for realsies this time.
2017-08-19 16:49:23 -10:00
Justin Kunimune
43dada1252 A new perspective
I added the perspective projection, a generalized form of the
orthographic and stereographic projections. I also added those contour
lines to shape distortion in a correct way. It looks a little ugly on
simple projections, but really cool on the more abstract ones.
2017-08-19 16:43:02 -10:00
Justin Kunimune
61ba22ce0c The illusion of accuracy
I tuned up the Hammer equations so that the areas beyond the ellipse
render appropriately in MapAnalyzer.
2017-08-19 10:29:04 -10:00
Justin Kunimune
8fa56caca0 I attempted to fix the optimizer
I failed. I can't even reproduce the problem right now. It's possible I
accidentally fixed it earlier.
2017-08-18 15:10:05 -10:00
Justin Kunimune
ea02e8a2ef Code writing code
I made a program to automatically generate HTML snippets to fill the
projection page in my GH-Pages branch. It also automatically produces
nice pictures to go with it. I also threw in a nifty new transverse
feature, primarily for azimuthal maps. And I now represent properties
and types as enums. And I fixed a bug in 2 point equidistant. And fixed
some unicode issues.
2017-08-18 15:08:59 -10:00
Justin Kunimune
f9356f40b8 I made another one
I invented another map projection, this one specifically designed for
small oblong regions. I think it looks pretty cool if I do say so
myself. There are holes at the bounds of my parameter, so I'll have to
take care of that, but honestly, I'm so sick of limits right now.
2017-08-16 14:53:21 -10:00
Justin Kunimune
7d2075a66a Closed-form solutions are my favourite solutions
I got an inverse solution for the two-point equidistant projection. It
currently has a lot of NaNs, divergences, and holes, but I'm going to
fix those once I finish simplifying the solution.
2017-08-15 13:11:41 -10:00
Justin Kunimune
076dcc5bc9 Merge branch 'master' of https://github.com/jkunimune15/Map-Projections 2017-08-14 23:53:05 -04: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
a8b132e9ba Two azimuths are better than one
I implemented the vector version of 2-point equisdistant, and while I
was at it, I changed up the vector version of obliquify. It is a bit
harder to read now, but somewhat faster, and no longer requires the
Vector utility class. I was going to do the raster version next, but
I've just had the most brilliant idea for refactoring the Projection
enum (maybe. It might be complete antidisestablismentarianism), and I
really want to see if Java will let me do it.
2017-08-06 12:28:30 -04:00
jkunimune
5515a36c63 The Mecca Projection (jk not rely)
I changed somewhat how parameters and aspects are treated, particularly
for the retroazimuthal and two-point equidistant projections, which
shouldn't really have aspects. Instead they now have parameters for
those latitudes and longitudes they use, and the aspect selector
disappears when they are selected.
I also moved around a few listeners, cleaned up my code by removing all
explicit EventHandler declarations, and reimplemented the thing where
dragging the sliders in Vector mode instantly changes the map, since
that's apparently not throwing an error anymore.
And in case you were wondering (though I don't know who would read this
besides me), the title references the fact that the "Mecca Projection"
is technically the quasicylindrical retroazimuthal projection, not the
quasiazimuthal one, but my Hammer Retroazimuthal centers on Mecca by
default now, so it's more or less a Mecca projection.
2017-08-05 18:56:44 -04:00
Justin Kunimune
761c439467 One Retroazimuth to rule them all
I combined the front and back hemispheres of the Hammer Retroazimuthal
to make one crazy looking map projection. It is still technically
correct, even though I rotated half of it 180 degrees to make it fit. As
classy as it was to have one map projection in two pieces, I think it
just works a lot better this way.
2017-07-31 21:51:45 -04:00
Justin Kunimune
13be6e4efc Which way to Millinocket?
I finished the Hammer Retroazimuthal projection! Man, that was some
crazy trigonometry.
2017-07-31 21:29:21 -04:00
Justin Kunimune
242302d5ad I need to commit so I can remove these 400 MB of executable from my repository. 2017-07-23 12:07:41 -04:00