def getRectangularGrid(diameter, loopsComplex, maximumComplex, minimumComplex, zigzag):
 demiradius = (0.25 * diameter)
 xStart = (minimumComplex.real - demiradius.real)
 y = (minimumComplex.imag - demiradius.imag)
 gridPath = []
 rowIndex = 0
 while (y < maximumComplex.imag):
  addGridRow(diameter, gridPath, loopsComplex, maximumComplex, rowIndex, xStart, y, zigzag)
  y += diameter.imag
  rowIndex += 1
 return gridPath

def getRectangularGrid ( diameter , loopsComplex , maximumComplex , minimumComplex , zigzag ) : demiradius = ( 0.25 * diameter ) xStart = ( minimumComplex . real - demiradius . real ) y = ( minimumComplex . imag - demiradius . imag ) gridPath = [ ] rowIndex = 0 while ( y < maximumComplex . imag ) : addGridRow ( diameter , gridPath , loopsComplex , maximumComplex , rowIndex , xStart , y , zigzag ) y += diameter . imag rowIndex += 1 return gridPath
get rectangular grid .