Gets gradient values for any given point.