- #1
PeetPb
- 29
- 0
Hi,
I need to plot a vector field 2x,2y,0 which is the gradient of the function x^2+y^2. I need to plot it only in some interesting points (points on the paraboloid x^2+y^2). So I tried something like
a=Table[{{x,y,x^2+y^2},{2x,2y,0}},{x,-2,2,0.5},{y,-2,2,0.5}]
ListVectorPlot3D[a]
It did not work. The definition of ListVectorPlot3D[{{x,y,z},{a,b,c}},...] says that it generates a 3D vector plot from vector field values {a,b,c} given at specified points {x,y,z}.
Any idea how I might plot that gradient on the paraboloid ? It would be really unpleasant if I had to do every single vector with Graphics3D[]
thanks
I need to plot a vector field 2x,2y,0 which is the gradient of the function x^2+y^2. I need to plot it only in some interesting points (points on the paraboloid x^2+y^2). So I tried something like
a=Table[{{x,y,x^2+y^2},{2x,2y,0}},{x,-2,2,0.5},{y,-2,2,0.5}]
ListVectorPlot3D[a]
It did not work. The definition of ListVectorPlot3D[{{x,y,z},{a,b,c}},...] says that it generates a 3D vector plot from vector field values {a,b,c} given at specified points {x,y,z}.
Any idea how I might plot that gradient on the paraboloid ? It would be really unpleasant if I had to do every single vector with Graphics3D[]
thanks