Group Abstract Group Abstract

Message Boards Message Boards

Animate a Vectorfield with VectorPlot3d , Scaling the Vectors

Posted 11 years ago
POSTED BY: Max E
3 Replies

If you have a problem with scaling you must add "Plot range".

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));

 Animate[VectorPlot3D[f[x, y, z, 1, m, 1], {x, -5, 5}, {y, -5, 5}, {z, -5, 5},VectorColorFunction -> Hue, PlotRange -> 5], {m, -5, 5, 1},AnimationRunning -> False]

Export to Animation.

ANIM = Table[
   VectorPlot3D[
    f[x, y, z, 1, m, 1], {x, -5, 5}, {y, -5, 5}, {z, -5, 5}, 
    VectorColorFunction -> Hue, PlotRange -> 5], {m, -5, 5, 0.25}];
Export["Test.gif", ANIM, ImageResolution -> 200]
POSTED BY: Mariusz Iwaniuk
Posted 11 years ago

This does not solve the Problem. The Problem is the different size of the vectors in each Frame.

But thank you for replying and trying to solve my problem ! Best regards, max

POSTED BY: Max E

In Documentation Center is written:

With the vector scaling function set to None, then all vectors have the same size.

Animate[VectorPlot3D[
 f[x, y, z, 1, m, 1], {x, -5, 5}, {y, -5, 5}, {z, -5, 5}, 
 VectorColorFunction -> Hue, PlotRange -> 5, 
 VectorScale -> {Small, Automatic, None}], {m, -5, 5, 0.5}, 
AnimationRunning -> False]

or

Animate[VectorPlot3D[
  f[x, y, z, 1, m, 1], {x, -5, 5}, {y, -5, 5}, {z, -5, 5}, 
  VectorColorFunction -> Hue, PlotRange -> 5, 
  VectorScale -> {Small, Small, None}], {m, -5, 5, 0.5}, 
 AnimationRunning -> False]

I hope it will help.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard