def addGridRow(diameter, gridPath, loopsComplex, maximumComplex, rowIndex, x, y, zigzag):
 row = []
 while (x < maximumComplex.real):
  point = complex(x, y)
  if euclidean.getIsInFilledRegion(loopsComplex, point):
   row.append(point)
  x += diameter.real
 if (zigzag and ((rowIndex % 2) == 1)):
  row.reverse()
 gridPath += row

def addGridRow ( diameter , gridPath , loopsComplex , maximumComplex , rowIndex , x , y , zigzag ) : row = [ ] while ( x < maximumComplex . real ) : point = complex ( x , y ) if euclidean . getIsInFilledRegion ( loopsComplex , point ) : row . append ( point ) x += diameter . real if ( zigzag and ( ( rowIndex % 2 ) == 1 ) ) : row . reverse ( ) gridPath += row
add grid row .