File:Mercator projections vs rotation.gif
Mercator_projections_vs_rotation.gif (800 × 339 pixels, file size: 4.22 MB, MIME type: image/gif, looped, 101 frames, 10 s)
This is a file from the Wikimedia Commons. The description on its description page there is shown below. |
Summary
DescriptionMercator projections vs rotation.gif |
English: Projecting a sphere on a surface can only be done at the price of some distortion.
Mercator's projection is very useful is you are sailing, but strongly distorts sizes. And if we can change what is at the centre of the map we can see how much. |
Date | |
Source | https://twitter.com/j_bertolotti/status/1529775116976017414 |
Author | Jacopo Bertolotti |
Permission (Reusing this file) |
https://twitter.com/j_bertolotti/status/1030470604418428929 |
Mathematica 13.0 code
world = CountryData["Countries", "SchematicPolygon"];
swap[c_] := {c[[2]], -(c[[1]] - 90)};
tmp = Flatten[world[[All, 1, 1]], 1];
tmp = Join[tmp, CountryData[\!\(\*
NamespaceBox["LinguisticAssistant",
DynamicModuleBox[{Typeset`query$$ = "antartica", Typeset`boxes$$ =
TemplateBox[{"\"Antarctica\"",
RowBox[{"Entity", "[",
RowBox[{"\"GeographicRegion\"", ",", "\"Antarctica\""}], "]"}],
"\"Entity[\\\"GeographicRegion\\\", \\\"Antarctica\\\"]\"",
"\"geographic region\""}, "Entity"],
Typeset`allassumptions$$ = {{"type" -> "Clash",
"word" -> "antartica",
"template" -> "Assuming \"antartica\" is a \
continent${separator}Use as ${desc} or ${desc} instead",
"count" -> "3", "pulldown" -> "false",
"default" -> "{\"C\", \"antartica\"} -> \
{\"GeographicRegion\", \"dflt\"}",
"Values" -> {{"name" -> "GeographicRegion",
"desc" -> "a continent",
"input" -> "{\"C\", \"antartica\"} -> \
{{\"GeographicRegion\", \"a continent\"}}"}, \
{"name" -> "CountryClass", "desc" -> "a class of countries",
"input" -> "{\"C\", \"antartica\"} -> \
{\"CountryClass\"}"}, {"name" -> "Desert", "desc" -> "a desert",
"input" -> "{\"C\", \"antartica\"} -> {\"Desert\"}"}}}},
Typeset`assumptions$$ = {}, Typeset`open$$ = {1, 2},
Typeset`querystate$$ = {"Online" -> True, "Allowed" -> True,
"mparse.jsp" -> 0.773653`6.340091207439451,
"Messages" -> {}}},
DynamicBox[ToBoxes[
AlphaIntegration`LinguisticAssistantBoxes["", 4, Automatic,
Dynamic[Typeset`query$$],
Dynamic[Typeset`boxes$$],
Dynamic[Typeset`allassumptions$$],
Dynamic[Typeset`assumptions$$],
Dynamic[Typeset`open$$],
Dynamic[Typeset`querystate$$]], StandardForm],
ImageSizeCache->{225.2265625, {8.11328125, 17.11328125}},
TrackedSymbols:>{Typeset`query$$, Typeset`boxes$$,
Typeset`allassumptions$$, Typeset`assumptions$$,
Typeset`open$$, Typeset`querystate$$}],
DynamicModuleValues:>{},
UndoTrackedVariables:>{Typeset`open$$}],
BaseStyle->{"Deploy"},
DeleteWithContents->True,
Editable->False,
SelectWithContents->True]\), "SchematicPolygon"][[1,
1]]];
world2 = Reap[For[j = 1, j <= Dimensions[tmp][[1]], j++,
Sow[\[Pi]/180 (swap /@ tmp[[j]])];
];][[2, 1]];
ToSphere[c_] := {Cos[c[[1]]] Sin[c[[2]]], Sin[c[[1]]] Sin[c[[2]]], Cos[c[[2]]]};
sphereworld = Reap[For[j = 1, j <= Dimensions[world2][[1]], j++,
Sow[(ToSphere[#] & /@ world2[[j]])];
];][[2, 1]];
ToMercator[c_] := {c[[2]], -Log[Cos[-(c[[1]] - \[Pi]/2)/2] - Sin[-(c[[1]] - \[Pi]/2)/2]] + Log[Cos[-(c[[1]] - \[Pi]/2)/2] + Sin[-(c[[1]] - \[Pi]/2)/2]]};
sinstep[t_] := Sin[\[Pi]/2 t]^2
frames = Table[
m = RotationTransform[-2 \[Pi] sinstep[t], {0, 1., 0}];
rotatedsphereworld =
Reap[For[j = 1, j <= Dimensions[sphereworld][[1]], j++,
Sow[(m /@ sphereworld[[j]])];
];][[2, 1]];
mercatorworld =
Reap[For[j = 1, j <= Dimensions[rotatedsphereworld][[1]], j++,
Sow[(ToMercator[#] & /@ (CoordinateTransform["Cartesian" -> "Spherical", rotatedsphereworld[[j]]][[All, 2 ;; 3]]) )];
];][[2, 1]];
mercatorworld2 =
Reap[For[j = 1, j <= Dimensions[mercatorworld][[1]], j++,
Sow[Split[mercatorworld[[j]], Abs[#2[[1]] - #1[[1]]] < 1 &]
];
];][[2, 1]];
GraphicsRow[{
Graphics3D[{Thick, Line /@ rotatedsphereworld, LightGray, Sphere[{0, 0, 0}, 1]}, Lighting -> "Neutral", Boxed -> False, ViewPoint -> {2, 0, 0}]
,
Graphics[{Line /@ mercatorworld2, Thick, Line[1.01 {{-\[Pi], -\[Pi]}, {-\[Pi], \[Pi]}, {\[Pi], \[Pi]}, {\[Pi], -\[Pi]}, {-\[Pi], -\[Pi]}}]}, PlotRange -> 1.*{{-\[Pi], \[Pi]}, {-\[Pi], \[Pi]}}, AspectRatio -> 1/1.61803, ImageSize -> 500]
}]
, {t, 0, 1, 0.01}];
ListAnimate[frames]
Licensing
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Items portrayed in this file
depicts
some value
26 May 2022
image/gif
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 09:26, 27 May 2022 | 800 × 339 (4.22 MB) | Berto | Uploaded own work with UploadWizard |
File usage
The following 2 pages use this file:
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
GIF file comment | Created with the Wolfram Language : www.wolfram.com |
---|