0
$\begingroup$

I want to animate a VectorPlot3D. But, Mathematica rescales the vectors in every frame. Can you scale them all to one fix point? For example, scale the vectors on their length compared to, say, the length of 10?

Edit

Example code:

 f[x_, y_, z_, g_, m_,v_] := 
   {((x)^2 - m), x*y,x*z}*(g*v^2)/
     (2*(g^2*((x)^2 - m)^2 + (v*y)^2 + (v*z)^2)^(3/2));   
plots = 
  Table[
    Show[
      VectorPlot3D[
        f[x, y, z, 1, e, 1], {x, -5, 5}, {y, -5, 5}, {z, -5, 5}, 
        VectorColorFunction -> Hue]], 
    {e, -5, 5, 1}];
ListAnimate[plots];
Export["Test.avi", plots, ImageResolution -> 200]

I want the size of the vectors to be relative to some fixed value , say 10, in every frame


Hi there and thank you,

some example code would be like

 f[x_, y_, z_, g_, m_,v_] := {((x)^2 - m), x*y,x*z}*(g*v^2)/(2*
                              (g^2*((x)^2 - m)^2 + (v*y)^2 + (v*z)^2)^(3/2));   
plots = Table[
   Show[VectorPlot3D[
     f[x, y, z, 1, e, 1], {x, -5, 5}, {y, -5, 5}, {z, -5, 5}, VectorColorFunction -> Hue]], {e, -5, 5, 1}];
ListAnimate[plots];
Export["Test.avi", plots, 
 ImageResolution -> 200]

and i want the size of the Vectors to be relative to some fixed value e.g. 10 in every frame

$\endgroup$
  • 1
    $\begingroup$ Max, show some of your code (a minimal working example would be best), so that we can reproduce what you see and start helping you out. $\endgroup$ – MarcoB May 20 '15 at 21:22
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey May 20 '15 at 21:23
  • 1
    $\begingroup$ Please add to your question the portion of you code that is causing problems. $\endgroup$ – bbgodfrey May 20 '15 at 21:24
1
$\begingroup$
Manipulate[
  VectorPlot3D[{a x, y, z}, 
  {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
  VectorScale -> {Large, Automatic, Sqrt[#1^2 + #2^2 + #3^2 ] &}],
 {a, 0, 1, .1}]
| improve this answer | |
$\endgroup$

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