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

Detecting points on the edges of a polygon #55

Open
JvandenAssum opened this issue Apr 10, 2022 · 0 comments
Open

Detecting points on the edges of a polygon #55

JvandenAssum opened this issue Apr 10, 2022 · 0 comments

Comments

@JvandenAssum
Copy link

Would it be possible to alter the visibile_vertices function to detect points on the edge of a polygon as well?

For example in the following example:

p1 = vg.Point(0.20,0.1)
p2 = vg.Point(0.50,0.5)
p3 = vg.Point(0.49,0.5)

polys = [[(0,0),(1,0),(0,1)]]
G = vg.Graph(polys)

vg.visible_vertices.visible_vertices(p1,G1,destination= p2) will return [Point(0.00, 1.00), Point(0.00, 0.00), Point(1.00, 0.00)]
vg.visible_vertices.visible_vertices(p1,G1,destination= p3) will return [Point(0.49, 0.50), Point(0.00, 1.00), Point(0.00, 0.00), Point(1.00, 0.00)]

Would it be possible to maybe alter the visibile_vertices function to get [Point(0.00, 1.00), Point(0.00, 0.00), Point(1.00, 0.00), Point(0.50, 0.50)] from vg.visible_vertices.visible_vertices(p1,G1,destination= p2) as well? Or is there another way to achieve this result?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant