title: How to divide a rectangle in specific number of rows and columns?
body: <p>I am trying to divide a rectangle with specific coordinates into 8 smaller rectangles (two columns and four rows) is this possible?</p>
  
  <p>Input for example would be:</p>
  
  <pre><code>rec = [(0, 0), (0, 330), (200, 330), (200, 0)]
  </code></pre>
  
  <p>and result would be:</p>
  
  <pre><code>res = [[(0, 0), (0, 82), (100, 82), (100, 0)], [(0, 82), (0, 164), (100, 164), (100, 82)],.......]
  </code></pre>
  
  <p>This is what I've tried so far:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>This is what I need (kind of :/):</p>
  
  <pre><code>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
                           -----------
  </code></pre>