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

Inconsistent Behavior in Nearly Degenerate Case #192

Open
LRenegar opened this issue Jun 16, 2020 · 1 comment
Open

Inconsistent Behavior in Nearly Degenerate Case #192

LRenegar opened this issue Jun 16, 2020 · 1 comment
Labels

Comments

@LRenegar
Copy link

The following input errors for a SphericalPolygon, but not SingleSphericalPolygon:

points = np.array([[0.87772279707663836, 0.34018023965617028, 0.33746125116734926],
	[0.92276918091486326, 0.36291770695506587, 0.12956765310905877],
	[0.92574575323628161, 0.36907299235098134,-0.082340310189372115]])

Stack trace:

  File "<stdin>", line 1, in <module>
  File "/home/[USER_REDACTED]/anaconda3/lib/python3.7/site-packages/spherical_geometry/polygon.py", line 767, in __init__
    polygons.extend(g.disjoint_polygons())
  File "/home/[USER_REDACTED]/anaconda3/lib/python3.7/site-packages/spherical_geometry/graph.py", line 459, in disjoint_polygons
    self._sanity_check("disjoint - find all intersections")
  File "/home/[USER_REDACTED]/anaconda3/lib/python3.7/site-packages/spherical_geometry/graph.py", line 390, in _sanity_check
    assert len(node._edges) >= 2
@LRenegar
Copy link
Author

To clarify, the following command produces the error:

import numpy as np
import spherical_geometry.polygon as polygon	   
points = np.array([[0.87772279707663836, 0.34018023965617028, 0.33746125116734926],
	[0.92276918091486326, 0.36291770695506587, 0.12956765310905877],
	[0.92574575323628161, 0.36907299235098134,-0.082340310189372115]])
	
p_valid = polygon.SingleSphericalPolygon(points)
p_error = polygon.SphericalPolygon(points)

@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