Grid generator