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

Intersection between square shaped nodes and edges #368

Open
legolie opened this issue May 1, 2022 · 0 comments
Open

Intersection between square shaped nodes and edges #368

legolie opened this issue May 1, 2022 · 0 comments

Comments

@legolie
Copy link

legolie commented May 1, 2022

Hi everyone, nice job with this library!!
However, I have a problem with the library

I want to write a program that counts the number of intersections between the nodes that are represented as a square with a specified size.
The main Problem is that, the nodes will be visualized as squares but if the coordinates of these nodes are just points x,y and here is exactly my Problem, because I want to check the intersections with the edges with the x,y coordinates but I can not do this properly!
because in some cases the corner of the square or its edges intersect with the edges but the original point that represents the square or the node in graphstream does not, I tried all the possible solutions with collinear points , slopes and everything but nothing worked for me, the question is, is there anyway in Grpahstream so that I can find out the coordinates of the edges or the corners of the square so that I can check with the line segment equation if they intersect ?

I mean something like that as shown in the picture
github graphstream

Best regards !

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