Reputation: 1160
Given that all nodes are locked and the layout doesn't matter.
Is there any existing solution that would be able to obtain a pool of valid positions for a programmatically spawned node (no coordinates available) that guarantees no overlapping with the locked nodes?
Upvotes: 0
Views: 110
Reputation: 5314
Not really familiar with cytoscape, but a quick look suggests that you could triangulate the points and then you have two insertion options within the convex hull of the locked points (if you are actually doing with a rectangular region, you could add the 4 corners as additional virtual points):
Those are the two easiest to calculate kinds of potential valid positions.
Upvotes: 2