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

Incorrect intersections when intersecting vertices #151

Open
accounts01 opened this issue Jun 20, 2023 · 1 comment
Open

Incorrect intersections when intersecting vertices #151

accounts01 opened this issue Jun 20, 2023 · 1 comment

Comments

@accounts01
Copy link

accounts01 commented Jun 20, 2023

The following produces no intersections but seems like it should:

intersections(
    new Circle( new Point(2, 3), 1),
    new Polygon( new Point(2, 3), new Point(3, 3), new Point(3, 4), new Point(2, 4) 
);

Intersections should be reported at 3, 3 and 2, 4. It seems that when the intersections occur at the polygon's vertices, they are not reported. Is this a bug or have I misunderstood how to use intersections? Thanks!

@accounts01
Copy link
Author

The Polygon.collision function appears to be marred by the same sort of issue. Collisions are not reported if the smaller polygon's vertices are along the larger polygon's edges.

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

1 participant