MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Manipulate a VectorFieldPlot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80464] Manipulate a VectorFieldPlot3D
  • From: Mathieu G <ellocomateo at free.fr>
  • Date: Thu, 23 Aug 2007 01:03:55 -0400 (EDT)

Hello,
I would like to 3D plot two time dependent fields E and B.
I have two questions about the current state of my notebook:

 Why the options Axes and AxesLabel produce an error, while producing
the expected behaviour (adding the axes label!)

 How can I have a Manipulate object that would allow me to scan over time?

Thanks for your help!
Mathieu




Clear["Global`*"]
<< PhysicalConstants`
Needs["VectorFieldPlots`"]
c = 299792458;(*SpeedOfLight*)
\[Mu] = \[Pi]/2500000;(*VacuumPermeability*)
\[Epsilon] = 8.854187817`*^-12;(*VacuumPermittivity*)
\[Omega] = 1;(*Angular speed*)
p = 1;(*Unit dipole moment*)
k = \[Omega]/c;(*Norm of the wave vector*)
r = Norm[{x, y, z}];(*Norm of the position vector*)
t = 10;(*Time*)
a = 10;

Slider[Dynamic[t],{0,100}]

Ex = (y^2 + z^2) Cos[\[Omega] Dynamic[t] - k r] - x y Sin[\[Omega]
Dynamic[t] - k r];
Ey = (x^2 + z^2) Sin[\[Omega] Dynamic[t] - k r] - x y Cos[\[Omega]
Dynamic[t] - k r];
Ez = z (x Cos[\[Omega] Dynamic[t] - k r] + y Sin[\[Omega] Dynamic[t] - k
r]);

Bx = -z Sin[\[Omega] Dynamic[t] - k r];
By = z Cos[\[Omega] Dynamic[t] - k r];
Bz = x Sin[\[Omega] Dynamic[t] - k r] - y Cos[\[Omega] Dynamic[t] - k r];

VectorFieldPlot3D[
   (\[Omega]^2 p / 4 \[Pi] \[Epsilon] c^2 r^3) {
     Ex, Ey, Ez
     }
   , {x, -a, a}, {y, -a, a}, {z, -a, a}
   , VectorHeads -> True
   , Axes -> True
   , AxesLabel -> {x, y, z}
   ]

VectorFieldPlot3D[
   (\[Mu] \[Omega]^2 p / 4 \[Pi] c r^2) {
     Bx, By, Bz
     }
   , {x, -a, a}, {y, -a, a}, {z, -a, a}
   , VectorHeads -> True
   , Axes -> True
   , AxesLabel -> {x, y, z}
   ]


  • Prev by Date: Re: Re: RE: Dashing with alternating colors?
  • Next by Date: Re: getting data for Histogram
  • Previous by thread: Re: Re: spurious $Aborted messages. How to track
  • Next by thread: Re: Manipulate a VectorFieldPlot3D