I'm having a little trouble solving my idea in processing.
I have a shape in the center, let's say a square. The background is a colour, the square is black. I want to 'split' the background into smaller pieces by a line, (right-angled?) on each corner of the shape. The new, splitted shapes are then coloured differently. I hope the images explain my problem a bit clearer.
The square could be any shape, so the lines will not always align perfectly.
Does anybody know a way to 'split' shapes, or how to handle this?