2
$\begingroup$

I have a couple of vectors. However, they are not ordered in a regular 3D fashion. Nevertheless, regarding the manual "With the setting VectorPoints->All, ListVectorPlot3D instead shows vectors associated with the particular vector field data points given." So I guess MMA should be able to display the following example:

vectors = {{1, 1, 1}, {2, 0, 1}, {1, 2, 3}, {0, 2, 0}, {3, 1, 1}};
points = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 1, 1}};
combo = Transpose[{points, vectors}];

ListVectorPlot3D[combo, VectorPoints -> points]

But plotting this, results in an empty box. Any hints?

EDIT: The data above are showing a MWE. I have in mind to plot in total 5000 vectors...

$\endgroup$
3
  • $\begingroup$ Not really. As far as I understand, Arrow affords starting and ending point of the vector. I have a direction (here as vectors) and the center position of the vectors (here as points). $\endgroup$
    – Kay
    Commented Jul 3, 2017 at 7:47
  • 1
    $\begingroup$ Right, my mistake, like: Graphics3D[Arrow[{#, +##} & @@@ combo]]? $\endgroup$
    – Kuba
    Commented Jul 3, 2017 at 7:49
  • $\begingroup$ Yeah, this is somehow what I want. Why isn´t ListVectorPlot3D able to show that? In addition to your above answer: How can I code the color of the arrows, for example linked with the Norm of the vectors $\endgroup$
    – Kay
    Commented Jul 3, 2017 at 7:52

1 Answer 1

2
$\begingroup$

Commands that start with "List" usually expect data to lie on a regular grid... I think the solution suggested in the comment by Kuba is great. Usually, I do it with

s = 0.1;
Graphics3D[Arrow[Transpose[{points, points + s vectors}]]]

where s is a scaling parameter.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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