| Author |
Comment/Response |
mike
|
10/01/07 11:40pm
hi, i'm trying to plot the electric field for multiple point charges and am using the ListPlotVectorField3D command, i can get them to work independently but not together. I am trying to do this as follows...
-load the package
<< Graphics`PlotField3D`
--point of charge q1
one = {1, 0, 0};
--E. field of charge q1
q1 = {1.798495821581965`*^10x, 1.798495821581965`*^10y, \
1.798495821581965`*^10z};
--point of charge q2
two = {2, 0, 0};
--E. field of charge q2
q2 = {2.2479511731752806`*^9x, 2.2479511731752806`*^9y, \
2.2479511731752806`*^9z};
--combine the 2 fields and points into an array
vectorSet = {{one, q1}, {two, q2 }};
--plot the 2 fields at respective points
ListPlotVectorField3D[vectorSet, VectorHeads -> True];
the ' --... ' are just comments to help clarify the code. but i keep getting a bunch of errors. Is this the right syntax for what i'm trying to do, or is there a better way to go about doing this? thanks for the help.
URL: , |
|