Preliminary 2D differentiation implementation