Make grid

make a grid but shifted in Y, i have a attachment anyone know how to code that?
Sorry i have a complete mental block, i attached the code one post below