assume grid to be in x-y plane