How to draw 3d vector field on a line?
I want to visualize the vector field $( m_x(x), m_y(x), m_z(x) )$. After searching "visualize vector field", I find that most plotting software either plotting 2d vector fields on the plane, like the velocity field, or the 3d vector field in 3d space, like $( u(x,y,z), v(x,y,z), w(x,y,z))$.
I have tried the MATLAB function quiver3 to plot my test data,
quiver3( x, zeros(1,N), zeros(1,N), mx, my, mz );
Here is what I get, quite unsatisfactory.
It would be better to replace by the ones in the following figure(some simple 3d rendering would be enough, don't need to exactly the same as the following),
[Credit: MPQ, Quantum Many Body Systems Division ]
So I want to ask, is it possible to produce such a demonstration, using say, asympotote/tikz/matlab/mathematica ? This vector field is a function of time, so I will generate a movie of those plots.
I don't require it be generated within TeX, as long as it can be finally incorporated in my TeX file. Strictly speaking, it is not a TeX-question; please migrate it to the appropriate StackExchange site if necessary.
Best Answer
With Asymptote it is possible to draw a 3D vector field along a surface (not a path). It is not difficult to adapt this routine to draw a 3D vector field along a path. However the sophisticated arrow is not availabe and needs more work. Please find a example
And the result
At last, what about a Python/Matplotlib/Numpy/Scipy solution (which can generate a movie) ?
Edit 11/17/2014. I tried to modify the vectorfield function of Asymptote and included special arrow. Because I do not know how depend your path and your vector field, the following routine draws a vector field along a curve, the vector field drawn on f(t) depends on the (f(x),f(y)). For the special arrow I do not create a new Arrow3 in the Asymptote sense, the sphere is added in the vectorfield routine
Please find the result