0
$\begingroup$

i want to plot this field: G(x,y,z) = (0,0,-b^3(x^2+y^2)cos(b^2(x^2+y^2))) with the parameter b>0. Is it possible to do that? if yes,how can i do that?

$\endgroup$
0
$\begingroup$

This will plot the vector field $G$ and allow you to vary $b$:

Manipulate[
 VectorPlot3D[{0, 0, -b^3 (x^2 + y^2) Cos[b^2 (x^2 + y^2)]},
  {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]
 , {b, 0.01, 3}]
| improve this answer | |
$\endgroup$
  • $\begingroup$ thank you. may i ask you if can i combine it with that plot ? ContourPlot3D[ x^2 + y^2 + 100*(z - 11)^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, 11, 11.3}] $\endgroup$ – amit Jun 21 at 17:28
  • $\begingroup$ Put the plots in a Show i.e using Show[plot1, plot2]. VectorPlot3D's styles like VectorSize don't behave very well in v12.1 so it might look a bit extruded due to the range of the first plot. $\endgroup$ – flinty Jun 21 at 17:57
  • $\begingroup$ it is doesnt work, i wrote that code: p1 = Manipulate[ VectorPlot3D[{0, 0, -b^3 (x^2 + y^2) Cos[b^2 (x^2 + y^2)]}, {x, -1, 1}, {y, -1, 1}, {z, 11, 11.3}], {b, 0.01, 3}]; p2 = ContourPlot3D[ x^2 + y^2 + 100*(z - 11)^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, 11, 11.3}]; Show[p1, p2] $\endgroup$ – amit Jun 21 at 18:04
  • $\begingroup$ @amit you can't put the manipulate in there - it should go on the outside. Do this: Manipulate[ Show[ ContourPlot3D[x^2 + y^2 + 100*(z - 11)^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, 11, 11.3}], VectorPlot3D[{0, 0, -b^3 (x^2 + y^2) Cos[b^2 (x^2 + y^2)]}, {x, -1, 1}, {y, -1, 1}, {z, 11, 11.3}, VectorSizes -> .3, VectorPoints -> 6]] , {b, 0.01, 3}] $\endgroup$ – flinty Jun 21 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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