I am trying to divide a rectangle with specific coordinates into 8 smaller rectangles (two columns and four rows) is this possible?
Input for example would be:
rec = [(0, 0), (0, 330), (200, 330), (200, 0)]
and result would be:
res = [[(0, 0), (0, 82), (100, 82), (100, 0)], [(0, 82), (0, 164), (100, 164), (100, 82)],.......]
This is what I've tried so far:
h = 330
w = 200
offsets = [(0, 0), (400, 0), (0, 500), (400, 500)]
blisters = []
for offset in offsets:
pol = [(offset), (offset[0], offset[1] + h), (offset[0] + w, offset[1] + h), (offset[0] + w, offset[1])]
blisters.append(pol)
pits = []
for offset in offsets:
pit = [(offset), (offset[0], int(offset[1] + a)), (int(offset[0] + b), int(offset[1] + a)), (int(offset[0] + b), offset[1]), ]
pits.append(pit)
This is what I need (kind of :/):
starting point in upper left corner (eg.(0,0))
___________
I I I
I I I
-----------
I I I
I I I
-----------
I I I
I I I
-----------
I I I
I I I
-----------

