vector fields & grid sampling

one of the most vexing things for me to illustrate is a planar vector field, especially when there is a singularity. there are so many distractions that arise from the canonical square-grid sampling that is endemic to software. here is an example with the linear vector field dx/dt = x ; dy/dt = -y

a typical square-grid vector field. what is happening near the origin?

now for something completely different: the loxodromic grid, obtained by intersecting two circle’s worth of counterspinning spirals. you see these in sunflowers, pinecones, and the like. it seems as though nobody uses the term loxodromic grid (why was it in my head when i wanted to call this something? why did i know to use 137.5 degrees? intuition is a frustrating thing…). it also seems as though nobody ever plots vector fields on such a grid. pity, since that meant it took me a long time to figure out how to do it. but: it is worth the trouble…

inear saddle, plotted on a loxodromic grid. notice the eerie floral uniformity. this feels balanced and unsettling all at the same time.

i really like the fact that the sampling gets increasingly tight near the equilibrium. i am simultaneously disturbed and pleased that the stable and unstable manifolds are “hidden” (as it were). it is fitting that you have a hard time visually getting on and staying on the stable manifold, since that’s exactly what happens in the flow. even the visual artefacts are instructive: note that near the origin, the tiny vectors are packed in such a way as to suggest not a circle (where the sampling points are) but a squashed ellipse. this is right: the flow squeezes and stretches areas.

this is not a perfect plot. but it is satisfying to me, after having tried and failed to make square and hex grids not look awful.

vector fields : the start

oh boy… this is going to be a frequent topic. i *hate* how vector fields are drawn. i don’t believe i’ve ever seen a vector field drawn well. ever. why? [hello matlab, mathematica, et al…]

  1. square grid sampling: yuk.
  2. non-adaptive sampling: too few samples near equilibria & too many where the vectors are large
  3. long vectors intersect: yuk.
  4. the arrows are drawn poorly. also, yuk.
  5. no/poor use of color.
  6. static pics — vector fields should induce flow (in your mind)

can i fix all these problems? hardly. not easily. but i’m trying. here’s an early attempt. it, too, is flawed. but notice the difference that a hex grid, a bit of style on the arrows, a little 3-d layering, and some ambient occlusion make.

BLUE 4 PROLOGUE : an early attempt at a vector field. ahhh…