Sample grid implementation