3D Vectors wrap on the Sphere

Create a mesh

mesh[θ_,n_]:=Table[{Cos[ϕ] Sin[θ],Sin[ϕ] Sin[θ],Cos[θ]},{ϕ,π/n,2 π,(2 π)/n}];
p={{0,1},{π/6,6},{2π/6,9},{3π/6,12},{4π/6,9},{5π/6,6},{π,1}};
points=Join[Flatten[mesh[#[[1]],#[[2]]]&/@p,1]];
  • There are 7 θ-slices: {0, π/6, 2π/6, 3π/6, 4π/6, 5π/6, π}. The number of ϕ-points in each slice is different for esthetic reasons.
  • p contains data of the form {θ,n}: how many ϕ-points is
    needed for each θ value.
  • points is a combined list of points where the vector field is plotted.

Define a field

field[x_,y_,z_]:=Module[{θ,ϕ},ϕ=If[x^2+y^2>0,ArcTan[x,y],0];θ=ArcTan[z,Sqrt[x^2+y^2]];
{-Sin[ϕ]Sin[θ],Cos[ϕ]Sin[θ],Cos[θ]}]

We will be plotting a skyrmion with winding number 1, as requested in the OP. Other customizations are possible. For instance one can consider higher-order skyrmions, or skyrmions with opposite topological chargeantiskyrmions.

Combine vector plot and a sphere

g1=VectorPlot3D[field[x,y,z],{x,-1,1},{y,-1,1},{z,-1,1},VectorPoints->points,VectorStyle->"Arrow3D",VectorColorFunction->Function[{x,y,z,vx,vy,vz,n},ColorData["Rainbow"][z]],Axes->False];
g2=Graphics3D[Sphere[{0,0,0},0.9]];
Show[{g1,g2},Boxed->False,ImageSize->Large]

enter image description here

Some interesting reading is here.

 

You can actually use a built-in function called SliceVectorPlot3D:

SliceVectorPlot3D[{y, -x, z}, "CenterSphere", {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]

to get:

enter image description here

Leave a Comment