Is there a way to view a vector field specified in voxels with a mask?
I have three 3D arrays with $x,y,z$ components of the fields at each voxel, as well as a 3D array of booleans saying which voxels should be viewed. All four arrays are the same size (roughly 60 x 60 x 60.)
So for a little test example:
testX = { (* X components *)
{{-1, -1, -1}, {1, 1, 1}, {-1, -1, -1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{-1, -1, -1}, {1, 1, 1}, {1, 1, 1}}
};
testY = { (* Y components *)
{{1, 1, 1}, {-1, -1, -1}, {-1, -1, -1}},
{{-1, -1, -1}, {1, 1, 1}, {-1, -1, -1}},
{{-1, -1, -1}, {-1, -1, -1}, {1, 1, 1}}
};
testZ = { (* Z components *)
{{1, 1, 1}, {-1, -1, -1}, {1, 1, 1}},
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}},
{{-1, -1, -1}, {-1, -1, -1}, {1, 1, 1}}
};
mask = {
{{False, True, False}, {True, False, True}, {False, True, False}},
{{False, True, False}, {True, False, True}, {False, True, False}},
{{False, True, False}, {True, False, True}, {False, True, False}}
};
So in this test example the voxel at $(1,1,2)$ should show the vector $(-1,1,1)$, but voxel $(1,1,1)$ should not display.
VectorPlot3D
. But I want to mask some voxels. If necessary, I could assign $x,y,z$ values to each voxel (say voxel $(1,1,1)$ would be at $(1,1,1)$ in space) I guess. (But I figured there might be something like matlab'squiver
which doesn't require $x,y$ values.) $\endgroup$ – user3658307 Feb 9 '17 at 17:22mask
? $\endgroup$ – C. E. Feb 9 '17 at 23:05