Tetris grid grouping

   2906   2   1
User Avatar
Member
26 posts
Joined: Sept. 2010
Offline
Hello!

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.

Does anyone have any idea how this might be done?

- Samboosa.

Attachments:
tetris_example_03.gif (5.8 KB)

User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
you could make a centroids for each square and then cluster them
.
User Avatar
Member
26 posts
Joined: Sept. 2010
Offline
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!
  • Quick Links