lycantropos / bentley_ottmann Goto Github PK
View Code? Open in Web Editor NEWDetection of line segments & polygon edges intersections
Home Page: https://bentley-ottmann.rtfd.io
License: MIT License
Detection of line segments & polygon edges intersections
Home Page: https://bentley-ottmann.rtfd.io
License: MIT License
This code snippet will cause an infinite loop
line_segment_coords = [
((116.19507998, -33.58039633), (116.19507998, -33.58039633)),
((116.19507998, -33.58039633), (116.19513912, -33.58040619)),
((116.19513912, -33.58040619), (116.19513363, -33.58043912)),
((116.19513363, -33.58043912), (116.19507545, -33.58042942)),
((116.19507545, -33.58042942), (116.19508094, -33.58039649)),
((116.19508094, -33.58039649), (116.19507998, -33.58039633))
]
intersections = segments_intersections(line_segment_coords)
Removing the first element of line_segment_coords
allows segments_intersections
to complete.
I was using the routine segments_intersections from bentley_ottmann.planar v 6.0.0 . I can't find it in v 7.1.0. Is it gone? Relocated? Thank you!
The following line
poly_point_isect.isect_polygon([[1,1], [0,1], [1,1]])
causes a crash, more specifically an AssertionError
.
I can understand that the desired result for this edge case might be arguable, but it should not crash everything. And since the coordinates in this case are integers, and the line segments are horizontal, there should not be any issues of "near-vertical segments" or numerical precision problems.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.