graphics/grid: Support XY/YZ grid generation