This question has been bothering me for a long time I wonder how to determine the direction of the gradient