Mathematica: Graph for a single vector instead of vector field?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 7K views
bentley4
Messages
66
Reaction score
0
Hi guys, I would like to construct 2 vectors on a coordinate grid.(or a vector field for only one t) of the forces between 2 point particles on a certain moment t. Can I do that?
When I try the VectorPlot function and insert all values instead of also inserting a variable it gives the error that it cannot exist out of only raw objects, that it cannot iterate.
Does anyone know how to do this?
 
Last edited:
Physics news on Phys.org
I think I tried to do this once, its very difficult to get it here you want. Basically its better to just use arrows:

Graphics[{Arrow[{{0, 0}, {0, 1}}], Arrow[{{0, 0}, {1, 0}}],
Arrow[{{0, 0}, {0, -1}}], Arrow[{{0, 0}, {-1, 0}}]}]

you could also just convert polar to cartesian to get it in terms of magnitude and angle if you needed.EDIT:
such as

AR[point_, mag_, \[Theta]_] = Arrow[{point, {mag Cos[\[Theta]], mag Sin[\[Theta]]}}]
Graphics[AR[{0, 0}, 1, 3 \[Pi]/2]]