# stream plot 2d cross section

Let say I have some 3d equation, something like

dx/dt=y-x

dy/dt=z(y-x)

dz/dt=y-z


I'd like to do a stream plot that is a cross section for some fixed z. Is there a way to do this?

• I'm not quite sure what you mean; since $dz/dt \neq 0$, the stream lines will generally not lie in a plane of fixed $z$. A naive "cross section" would then just be a bunch of points, corresponding to the intersections of each 3D streamline with the fixed-$z$ plane. Can you give an example of a plot somewhere else on the web that could help us visualize what you want? Commented Aug 12, 2016 at 17:52

You may use SliceVectorPlot3D.

Manipulate[
SliceVectorPlot3D[{y - x, z (y - x), y - z},
{y == 0, z == a}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}],
{{a, -1}, -1, 1}]


Hope this helps.

• Interesting, I didn't know you could do that with the Sliced Vector Plot. This is sort of what I was looking for. Thank you! Commented Aug 19, 2016 at 16:30

By plotting the projection of your vectors on an x-y-plane, like so:

u = y - x
v[z_] = z (y - x)
Manipulate[StreamPlot[{u, v[z]}, {x, -1, 1}, {y, -1, 1}], {z, -1, 1}]


Is this what you're looking for?

• Projection is a nice idea, but if the lines of StreamPlot represent trajectories over time, then z would be changing throughout that time altering the vector field & trajectories. While the lines have little significance, it seems to me the projected direction field has some meaning. Commented Aug 12, 2016 at 19:15