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

Wrong area output when intersecting two circles on a sphere #198

Open
mskd12 opened this issue Sep 19, 2020 · 0 comments
Open

Wrong area output when intersecting two circles on a sphere #198

mskd12 opened this issue Sep 19, 2020 · 0 comments
Labels

Comments

@mskd12
Copy link

mskd12 commented Sep 19, 2020

Hi,

Can someone explain the results from the two snippets below. Unless I'm missing something basic, there seems to be a bug in the code.

p1 = SphericalPolygon.from_cone(0, 0, 179.99999999)

p2 = SphericalPolygon.from_cone(0, 0, 179.9999)

p1.intersection(p2).area()

This snippet outputs 12.566370614349879 (4 pi) as expected. Here's the second:

p1 = SphericalPolygon.from_cone(0, 0, 179.99999999)

p2 = SphericalPolygon.from_cone(1, 0, 179.9999)

p1.intersection(p2).area()

This snippet outputs 9.29389898374211e-12. Presumably, the smaller circle (of the two) is being thought of as the intersection output which is wrong. Can someone explain what is happening? Any help is greatly appreciated.

@pllim pllim added the bug label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants