1
$\begingroup$

I have the following vector functions:

$$E=\left\langle \cos\left[\frac{\pi x}{5}\right]\sin\left[\frac{\pi y}{4}\right], \sin\left[\frac{\pi x}{5}\right]\cos\left[\frac{\pi y}{4}\right], \sin\left[\frac{\pi x}{5}\right] \sin\left[\frac{\pi y}{4}\right] \right\rangle$$

$$B=\left\langle -\sin\left[\frac{\pi x}{5}\right]\cos\left[\frac{\pi y}{4}\right], \cos\left[\frac{\pi x}{5}\right]\sin\left[\frac{\pi y}{4}\right],0 \right\rangle$$

And I'd like to graph each of these in a different plane, so I want to know what they look like in the $xy$, $xz$, and $yz$ planes. Using stream plot I got a graph of the view in the $xy$ plane that I was happy with but with the other perspectives I'm finding them difficult to plot and I think it's because I have to use $x$ and $y$ bounds for StreamPlot. So, I'm wondering if there is a way to graph these vector fields in the $xz$ and $yz$ plots so that I have functions that aren't varying with respect to the $z$ axis? Because, for example, right now what I'm doing is just replacing the $x$ component with the $z$ component and graphing but since my $z$ component is in terms of $x$ it changes with the bounds which I don't want it to do.

$\endgroup$
2
  • 2
    $\begingroup$ does e = {Cos[\[Pi] x/5] Sin[\[Pi] y/4], Sin[\[Pi] x/5] Cos[\[Pi] y/4], Sin[\[Pi] x/5] Sin[\[Pi] y/ 4]}; SliceVectorPlot3D[e, "BackPlanes", {x, -2, 2}, {y, -2, 2}, {z, -2, 2}] give what you need? $\endgroup$
    – kglr
    Feb 28 at 4:11
  • $\begingroup$ YES thank you!! $\endgroup$ Feb 28 at 18:25
4
$\begingroup$

You might consider SliceVectorPlot3D with "BackPlanes" as the second argument:

e = {Cos[π x/5] Sin[π y / 4], Sin[π x / 5] Cos[π y/4],  Sin[π x / 5] Sin[π y / 4]};

SliceVectorPlot3D[e, "BackPlanes", {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]

enter image description here

$\endgroup$

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.