Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Myriahedral projections? #67

Open
espinielli opened this issue Jul 6, 2016 · 6 comments
Open

Myriahedral projections? #67

espinielli opened this issue Jul 6, 2016 · 6 comments

Comments

@espinielli
Copy link

Given I have seen issues with requests for "fancy" map projections, why not proposing the fanciest?

Myriahedral map projections by Prof. Jarke van Wijk

image

@mbostock mbostock changed the title Request: myriahedral map projection Myriahedral map projections? Nov 1, 2016
@mbostock mbostock changed the title Myriahedral map projections? Myriahedral projections? Nov 1, 2016
@Fil Fil mentioned this issue Jan 11, 2017
@Fil
Copy link
Member

Fil commented Aug 7, 2017

myriahedral projection

@Fil
Copy link
Member

Fil commented Aug 7, 2017

icosahedral projection

icosahedral (#87) dodecahedral is sort-of a consequence of this

@Fil
Copy link
Member

Fil commented Aug 9, 2017

I had not read prof. Jarke van Wijk (JvW)'s article in details, and mainly used the images as a source of inspiration. Now I'm trying to figure out how far my implementation is from his.

Being lazy, I didn't want to create an algorithm for the meshes coordinates, and used geoVoronoi instead. So, I create the mesh of cells from their centers (JvW constructs the "dual mesh" from the initial mesh). Then, from the geo Delaunay list of links I extract a spanning tree with a minimal total length (this could be any other weight function, to reflect geographic features). For this, I used Kruskal's algorithm not Prim's (not that it matters).

The map above is defined by the centroids of each feature (countries) from a geojson file — and as there are more countries on the continents than in the oceans, it tends to use the continents as "valleys" of the minimal spanning tree.

Having geoVoronoi cells, I center the gnomonic projection for each face at its corresponding voronoi center. This has the nice property that the centers of two linked faces are equidistant from their common edge, so the scale must be the same on the two faces. As a consequence, it is constant throughout the mesh. (This also help explain why the paper model folds back perfectly, at least in one case.)

voronoi earth paper toy

It does not mean that the projection is equivalent. However, the scale is the same locally around each of the initial centers. And the distortion is capped by the maximum distance between a cell's perimeter and its center (which MUST be < 90° for the gnomonic) — which converges to zero as the density of cells grows.

Here's another map where I added one step of "Lloyd's relaxation" to grow the smaller cells and avoid having too much distorsion. I also removed the smaller countries from the mesh, so there were less cuts.

voronoi projection

An advantage of using geoVoronoi is that I don't have to create smaller triangles to accomodate polygonal cells as JvW does ("by inserting interior edges with very high weights", p. 34). As long as the maximum distance between a cell's perimeter and center is < 90°, the projection will map each polygon without further splicing, and this is why it's feasible to draw each polygon with a specific color.

There are things that I have yet to do (and may be possible or not):

  • In particular, find a way to recreate figures similar to those defined by JvW (I particularly like "the coastline of the Earth" — figure 12). This means experimenting with recipes to define the centers and the weights of the links (or using something else than the MST to define the relevant spanning tree).

  • Also, d3.geoPolyhedral doesn't (yet) allow "partial unfolding", so we can't make this very nice movie of the map slowly going from orthographic to unfolded. (Projection transition? three.js?) There's lots of experimentation to do here too.

To sum up, I don't think that my system is implementing myriahedral projections in the way they are defined in JvW's article, and while some results look very similar, the approach is quite different.

Maybe using a different name would be more appropriate? (polyhedralVoronoi?)

PS: For fun I generated a mesh from a Fibonacci quasi-random distribution of points on the sphere, and called the result "fibonacci projection". It makes no sense but it's a great test case for d3/d3-geo#108
fibonacci sphere projection

@jrus
Copy link

jrus commented Aug 17, 2017

Doesn’t seem to be quite as fancy as the versions in the paper, but very nice work!

@Fil
Copy link
Member

Fil commented Aug 17, 2017

Fancier is on the way :)

Using a spanning tree focused on the oceans:

voronoi coastline

@Fil
Copy link
Member

Fil commented Aug 17, 2017

& with a focus on land masses
voronoi continents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants