Perforation Pattern with Non-Overlapping Squares of Varying Sizes

I am modeling a perforation design, and I want to use squares instead of circles for the pattern. However, when I try this, I keep encountering overlaps, and I haven’t been able to solve it. I would really appreciate your help in fixing this issue.

The goal is to create a perforation design with squares of different sizes, achieving the desired gradient effect in the image without any overlaps.
perforated facade circle.gh (2.3 MB)

I see no squares? What would you like to do with overlaps? (I see no overlaps :interrobang:)


perforated facade circle_2025Feb10a.gh (2.4 MB)

You can calculate the distance between 2 points, along horizontal and and vertical. Then take the minimum and then multiply this distance with brightness and then your square will never overlap. I added a coefficient in order to decrease all dimensions

perforated facade circle.gh (2.5 MB)