Gradient path in 8x8 matrix