https://numbas.mathcentre.ac.uk/question/17798/calculating-gradient.zip?