0
$\begingroup$

Is it possible to display e.g., $z=x^2+y^2$ with Plot3D and in the same box, in the $z=0$ plane, plot its gradient?

$\endgroup$
2
5
$\begingroup$
p = Plot3D[x^2 + y^2, {x, -1, 1}, {y, -1, 1}];
pv = VectorPlot3D[{{2 x, 2 y, 0}, {-2 y, 2 x, 0}}, {x, -1, 1}, {y, -1,
     1}, {z, -0.01, 0.01}, 
   PlotRange -> {Automatic, Automatic, {-1, 1}}];
Show[pv, p]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.