0
$\begingroup$

I have a vector field where all vectors are contained in a cylinder. I want to see the shape of this cylinder. I could see a cubic box if I would change Boxed->True, but the shape of the box is cubic!!

Any help?

    table = Import["http://pastebin.com/raw/rjM2i5Jt", "Table", "IgnoreEmptyLines" -> True];
X = table[[;; , ;; 3]];
V = table[[;; , 4 ;; 6]];
Graphics3D[{[email protected], {If[Subtract@@#[[;;,3]] <= 0, Red, Blue], 
     Arrow[#]}& /@ Transpose[{X, X + .07 Normalize /@ V}]}, 
 BoxRatios -> {1, 1, 1}, PlotRange -> All, ViewPoint -> {1, 1, 1}, 
 ViewVertical -> {0, 1, 0}, Boxed -> False]
$\endgroup$

1 Answer 1

1
$\begingroup$
X = table[[;; , ;; 3]];
V = table[[;; , 4 ;; 6]];
Graphics3D[{
  {Opacity[0.5], Cylinder[{{0, 0, .4}, {0, 0, 1}}, .43]},
  [email protected], {If[Subtract @@ #[[;; , 3]] <= 0, Red, Blue], 
     Arrow[#]} & /@ Transpose[{X, X + .07 Normalize /@ V}]}, 
 BoxRatios -> {1, 1, 1}, PlotRange -> All, ViewPoint -> {1, 1, 1}, 
 ViewVertical -> {0, 1, 0}, Boxed -> False]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.