I want to detect separate shapes as lines split the canvas. I saved line intersection points in the list of PVectors, but don’t know how to connect points that complete split shapes separately.
Here’s a sample image that has 4 lines splitting the canvas with their intersection points marked in red and saved in the list (the left one). I also saved in the same list the corners and default line points marked in black. Is there any way to detect all split shapes separately, for example, to apply different colors to each? (The image on the right is what I want to.)
The feature will be included in the next release of Processing Geometry Suite (for now the code is in the dev branch – you don’t even need to compute points of intersection, simply provide a list of line segment vertices).