I have a graph where each node is associated with a 2D position. I would like to use a finite line to "cut" this graph into two halves, as shown below:
Note that the cutting line does have a direction. All vertices in that direction remain and aren't cut away.
How can I implement this?