2
$\begingroup$

I am trying to produce the trajectory of the charged particle in $E=(0,0,E)$ and $B=(B,0,0)$. The relevant equations are: $$y(t) = \frac{E}{\omega B}(\omega t - \sin{\omega t}), \quad z(t) = \frac{E}{\omega B}(1 - \cos{\omega t})$$

This is from Griffiths, D, Introduction to Electrodynamics. I was looking to get a figure looking like this:

enter image description here

The code that I wrote was

ClearAll["Global`*"]
Velocity = 2.0 10^4;
BField = 100 10^-9;
EField = Velocity*BField;
w = 4;
ParametricPlot3D[{0, EField/(w BField) (w t - Sin[w t]), 
  EField/(w BField) (1 - Cos[w t])}, {t, 0, 3}, 
 PlotStyle -> {Directive[Blue, Dashed]}, AxesLabel -> {x, y, z}, 
 LabelStyle -> Directive[Blue, Bold], ViewPoint -> Right, 
 ImageSize -> Large]

This gives a plot which looks like: enter image description here

Even though the features are the same, this does not like the one that I am planning to reproduce.

Could anybody let me know, what am I doing wrong? Thanks in advance

$\endgroup$

2 Answers 2

5
$\begingroup$

We can also draw the frame manually.

ClearAll["Global`*"]
Velocity = 2.0 10^4;
BField = 100 10^-9;
EField = Velocity*BField;
w = 4;
plot = ParametricPlot3D[{0, EField/(w BField) (w t - Sin[w t]), 
     EField/(w BField) (1 - Cos[w t])}, {t, 0, 2 \[Pi]}, 
    PlotStyle -> 
     Arrowheads[{{.03, 1/8 + .02}, {.03, 3/8 + .02}, {.03, 
        5/8 + .02}, {.03, 7/8 + .02}}]] /. Line -> Arrow;
{{xmin, xmax}, {ymin, ymax}, {zmin, zmax}} = 
  PlotRange /. AbsoluteOptions[plot, PlotRange];
frame = Graphics3D[{Black, 
    Arrow[Tube@{1.2 {0, ymin, 0}, 1.2 {0, ymax, 0}}], 
    Arrow[Tube@{{0, 0, 0}, {50000, 0, 0}}], 
    Arrow[Tube@{1.2 {0, 0, zmin}, 2 {0, 0, zmax}}]}];
Show[plot, frame, ViewPoint -> {1, 0.2, .2}, 
 ViewProjection -> "Orthographic", PlotRange -> All, 
 AxesEdge -> {{1, -1}, {1, -1}, {1, -1}}, 
 Boxed -> {Front, Bottom, Left}]

enter image description here

$\endgroup$
3
$\begingroup$

The numerical values for B making it hard to visualize since it is so small. How about

Velocity = 2.0 10^4;
B0 = 10000;
E0 = Velocity*B0;
w = 4;
z[t_] := E0/(w B0) (1 - Cos[w t])
y[t_] := E0/(w B0) (w*t - Sin[w t])

ParametricPlot3D[{B0, y[t], z[t]}, {t, 0, 6}, 
 AxesLabel -> {"x", "y", "z"}, BaseStyle -> 14, 
 PlotRange -> {{0, B0}, Automatic, Automatic}, 
 ViewPoint -> {1, 1, 1}, ImageSize -> 300, SphericalRegion -> True]

Mathematica graphics

Then use the mouse to change the view point/angle?

$\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.