1
$\begingroup$

I am trying to create animations of a time dependent vector field $\vec v(t,x,y)$. The problem is that VectorPlot scales the vectors for each time $ t $ separately based on the minimal and maximal norm of the vector field at that time.

This answer shows how to solve this problem using VectorScale in the case in which the ratio of the max. norm for some time $ t$ and the the max. norm over all times is known. I suppose this could be found by evaluating $ \vec v $ on a $ (t,x,y) $ grid, but that makes for quite a lot of evaluations which I'd rather avoid. Surely there is a simpler way?

$\endgroup$
1
$\begingroup$

Try VectorScale this way:

Animate[
 VectorPlot[{Cos[2 \[Pi] x + t], Sin[2 \[Pi] y + t^2]},
  {x, -1, 1}, {y, -1, 1},
  VectorScale -> {Large, Scaled[1]}],
 {t, .1, 2, .05}]
$\endgroup$
  • $\begingroup$ But e.g. with the vector field 1/t {Cos[2 \[Pi] x + t], Sin[2 \[Pi] y + t^2]}, this will not reproduce the shrinking vector magnitudes correctly, which is what I am after. $\endgroup$ – Johannes R. Jan 6 at 22:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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