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?
1 Answer
$\begingroup$
$\endgroup$
4
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}]
-
$\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– amit2020-06-21 17:28:23 +00:00Commented Jun 21, 2020 at 17:28
-
$\begingroup$ Put the plots in a
Showi.e usingShow[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– flinty2020-06-21 17:57:59 +00:00Commented Jun 21, 2020 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– amit2020-06-21 18:04:03 +00:00Commented Jun 21, 2020 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– flinty2020-06-21 19:58:45 +00:00Commented Jun 21, 2020 at 19:58