0

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?

Frank
  • 3
  • 1

1 Answers1

5
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

Basheer Algohi
  • 19,917
  • 1
  • 31
  • 78