PDA

View Full Version : Mathematica: Graph for a single vector instead of vector field?


bentley4
Jun28-11, 06:07 AM
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?

Hepth
Jun28-11, 11:10 AM
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]]