makind a XYZ grid