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

South aspect of Lee’s conformal projection in a tetrahedron is all black #28

Closed
espinielli opened this issue Apr 11, 2019 · 4 comments

Comments

@espinielli
Copy link

South aspect of Lee’s conformal projection in a tetrahedron shows all black.

From the tweet exchange @Fil has verified that

it doesn't happen with d3-geo-polygon@1.7 but with d3-geo-polygon@1.8

@Fil
Copy link
Member

Fil commented Apr 11, 2019

Ref: https://observablehq.com/@fil/lee-projection (which I momentarily “fixed” by going back to d3-geo-polygon@1.7).

@Fil
Copy link
Member

Fil commented Apr 11, 2019

the bad commit is eb1e663 (of course)

@Fil
Copy link
Member

Fil commented Apr 11, 2019

There is this quick test in https://github.com/d3/d3-geo-polygon/blob/master/src/intersect.js#L19 : two arcs of angles a.l and b.l can not intersect if the distance between start (or end) of the first and the start (or end) of the second make an angle > a.l + b.l.

I optimized it with the acos of the angles and forgot that, if A+B > pi, the cosine increases again. Fix and test incoming.

Fil added a commit that referenced this issue Apr 11, 2019
fix geoTetrahedralLeeSouth
#28
@Fil Fil closed this as completed Apr 11, 2019
@espinielli
Copy link
Author

you are a wizard!
well done and thanks

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

2 participants