Skip to main content
added 180 characters in body
Source Link
Ulrich Neumann
  • 56.8k
  • 2
  • 26
  • 60

Try RegionFunction instead of Piecewise

VectorPlot3D[Sqrt[4 - (x^2 + y^2 + z^2)] {y, -x, 0}, {x, -2, 2}, {y, -2,2}, {z, -2, 2}  
, RegionFunction -> Function[{x, y, z}, 4 > (x^2 + y^2 + z^2)],VectorPoints -> Fine]

enter image description here

or alternatively Boole

VectorPlot3D[Boole[4 > (x^2 + y^2 + z^2)] Sqrt[4 - (x^2 + y^2 + z^2)] {y, -x,0}
, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}  , VectorPoints -> Fine]

Try RegionFunction instead of Piecewise

VectorPlot3D[Sqrt[4 - (x^2 + y^2 + z^2)] {y, -x, 0}, {x, -2, 2}, {y, -2,2}, {z, -2, 2}  
, RegionFunction -> Function[{x, y, z}, 4 > (x^2 + y^2 + z^2)],VectorPoints -> Fine]

enter image description here

Try RegionFunction instead of Piecewise

VectorPlot3D[Sqrt[4 - (x^2 + y^2 + z^2)] {y, -x, 0}, {x, -2, 2}, {y, -2,2}, {z, -2, 2}  
, RegionFunction -> Function[{x, y, z}, 4 > (x^2 + y^2 + z^2)],VectorPoints -> Fine]

enter image description here

or alternatively Boole

VectorPlot3D[Boole[4 > (x^2 + y^2 + z^2)] Sqrt[4 - (x^2 + y^2 + z^2)] {y, -x,0}
, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}  , VectorPoints -> Fine]
Source Link
Ulrich Neumann
  • 56.8k
  • 2
  • 26
  • 60

Try RegionFunction instead of Piecewise

VectorPlot3D[Sqrt[4 - (x^2 + y^2 + z^2)] {y, -x, 0}, {x, -2, 2}, {y, -2,2}, {z, -2, 2}  
, RegionFunction -> Function[{x, y, z}, 4 > (x^2 + y^2 + z^2)],VectorPoints -> Fine]

enter image description here