Implement the gradient.
Rotated the gradient.