# function that generates a grid of rectangles over a given rooftop. The grids are always started from the bottom-left corner of the (south-facing) rooftop
# "rooftop" must have the following attributes:
# - n_rows, n_cols: number of rows and columns of grid to be created, respectively
# - cell_width, cell_height: PROJECTED width and height of cells (original height multiplied by panel_tilt)
# - origin_x_rot, origin_y_rot: bottom left corner of the roof if rotated to face south
# - NEIGING: tilt of rooftop (different rule of placing panels for flat and for tilted roofs)
# - AUSRICHTUNG: orientation of rooftop (for de-rotation of origin)
# get input parameters
split_x=int(rooftop.n_cols)# number of splits in x-direction
split_y=int(rooftop.n_rows)# number of splits in y-direction