Let's say I have a grid of 10 x 10 squares, what I want to do is make multiple tetris like groups of squares of which each group contains squares that are connected.
After I've made the multiple groups in a partition (based on color) for example, I would process them further.
thank you zdimaria! After your post I created a point for the center of every square, then I created points which I wanted to use as the center of every cluster, now I have a result which isn't exactly tetris shaped, but it works better!