I would like to reproduce the neutron star (NS) dipole magnetic field in the 3D space. I have also a constraint, the line should start from the inner edge of an accretion disk and go toward the pole of the NS magnetic axis. In the attached figure, I have realized the simple case where the magnetic axis coincides with the rotation axis, which is orthogonal to the plane, where the disk lies. I would like to extend this configuration to the case where the magnetic axis is inclined by an angle beta with respect to the rotation axis. In this particular case, I have to draw the magnetic field lines that are closer to the magnetic axis. Therefore some of them will be connected with the North pole, while the other with the South pole. I report below my code in Mathematica:
RS = 6; (*NEUTRON STAR RADIUS*)
RM = 40; (*MAGNETOSPHERIC RADIUS=INNER EDGE OF THE DISK*)
ROUT = RM + 10; (*OUTER EDGE OF THE DISK*)
\[Beta] =
30*Degree; (* INCLINATION OF THE MAGNETIC AXIS*)
i = 60*Degree; (*INCLINATION OF THE OBSERVER*)
NS = SphericalPlot3D[RS, {x, 0, 2*Pi}, {y, 0, Pi},
ColorFunction -> Black, PlotStyle -> {Gray, Opacity[1]},
Mesh -> None, PlotPoints -> 50]; (*NEUTRON STAR*)
DISK = ParametricPlot3D[{r*Sin[Pi/2]*Cos[\[Phi]],
r*Sin[Pi/2]*Sin[\[Phi]], r*Cos[Pi/2]}, {r, RM, ROUT}, {\[Phi], 0,
2*Pi}, Mesh -> None, PlotPoints -> 50]; (*DISK*)
raxis = Graphics3D[{Red, Arrowheads[0.02],
Arrow[Tube[{{0, 0, -10}, {0, 0, 10}},
0.02]]}] ; (*ROTATION AXIS*)
maxis =
Graphics3D[{Blue, Arrowheads[0.02],
Arrow[Tube[{{10*Sin[Pi + \[Beta]], 0,
10*Cos[Pi + \[Beta]]}, {10*Sin[\[Beta]], 0, 10*Cos[\[Beta]]}},
0.02]]}] ; (*MAGNETIC AXIS AXIS*)
OBSERVER =
Graphics3D[{PointSize[Large],
Point[{0, ROUT*Sin[i], ROUT*Cos[i]}]}];
lineofsight =
Graphics3D[{Dashed,
Line[{{0, 0, 0}, {0, ROUT*Sin[i],
ROUT*Cos[i]}}]}]; (*OBSERVER AT INFINITY*)
NN = 100; (*NUMBER OF MAGNETIC FIELD LINES*)
f[j_] := -Pi/2 + Pi*j/NN; (*PHI COORDINATE*)
PN[x_, j_] := (RM*Sin[x]^2)*{Sin[x]*Cos[f[j]], Sin[x]*Sin[f[j]],
Cos[x]}; (*POINTS OF THE MAGNETIC FIELD LINES*)
ld = Table[
ParametricPlot3D[PN[x, j], {x, 0, Pi/2}], {j, 0, NN,
1}]; (*MAGNETIC FIELD LINES DISK-NORTH POLE*)
lind =
Table[ParametricPlot3D[(-PN[x, j]), {x, 0, Pi/2}], {j, 0, NN,
1}]; (*MAGNETIC FIELD LINES DISK-SOUTH POLE*)
Show[NS, DISK, raxis, maxis, OBSERVER, lineofsight, ld, lind,
PlotRange -> All, Axes -> False, Boxed -> False, ImageSize -> 800]
I have some questions: 1) Is it correct what I have plotted? 2) How do I extend this plot for an inclined magnetic field? Thank you very much in advance for your great help.