# How can I reproduce a beautiful 3D vector plot?

I am a Mathematica V8 user.

I found a very beautiful 3D vector plot on the Internet. I don't think it was created in Mathematica, but I'd like to reproduce it with Mathematica. How to do that?

EDIT

This image originates from an article by FZ Jülich with further details available in Nature and depicts a skyrmion. In particular, the explicit parametrization of the spins is given by

{x, y, z} ==
{
Cos[m ϕ + γ] Sin[θ[r]],
Sin[m ϕ + γ] Sin[θ[r]],
Cos[θ[r]]
}


where r and ϕ are polar coordinates and θ[r] is the polar angle of the spin as a function of radial coordinate. θ[r] is further parametrized as

θ[r] == Pi + ArcSin@Tanh[(r - c)/w] + ArcSin@Tanh[(r + c)/w]


where c and w are magnetic field dependent parameters (see the supplementary materials in the linked article for details).

For Example, this vector function is a good example,

k := {kx, ky}
d := 4
R1 := {1/Sqrt, 0}
R2 := {-1/(2*Sqrt), 1/2}
R3 := {-1/(2*Sqrt), -1/2}
f := Exp[I*k.R1] + Exp[I*k.R2] + Exp[I*k.R3]
Spin = Normalize@{(2*(-Sqrt[d^2/4 + Abs[f]^2] - d/2))/(Abs[f]^2 + (Sqrt[d^2/4 + Abs[f]^2] + d/2)^2) Re[f], (2*(Sqrt[d^2/4 + Abs[f]^2] + d/2))/(Abs[f]^2 + (Sqrt[d^2/4 + Abs[f]^2] + d/2)^2) Im[f], 1};


But if we code simply, the 3D vector plot is not so cool.

VectorPlot3D[Spin, {kx, -2 Pi, 2 Pi}, {ky, -2 Pi, 2 Pi}, {kz, -Pi,Pi},
VectorPoints -> {18, 18, 3}, VectorScale -> 0.05,
VectorColorFunction->Function[{kx, ky, kz, vx, vy, vz, n},
ColorData["ThermometerColors"][vz]],
RegionFunction -> ((-.1 < #3 < .1) &),
Boxed -> False,
Axes -> None]


How should we do? • "I found very beautiful 3d vector plot on the Internet." - then, link to it, please. Sep 20 '17 at 6:36
• To J.M. here is the link. learnabouttravelmaps.info/pics/g/germanene-zandvliet.html Sep 20 '17 at 7:36
• @J.M. with some google-fu I found that this is a representation of a skyrmion from FZ Jülich and published in Nature. Some reading through the article can give us the proper parametrization of the spins. Sep 20 '17 at 11:45
• Thank you for finding and including the link, @LLlAMnYP. I hope the OP would do this him/herself for his/her future questions. Sep 20 '17 at 12:37
• @J.M in this case it requires relevant domain knowledge plus access to Nature. That's why strangers from the internet are necessary :-) Sep 20 '17 at 13:06

Nice "inverse problem". The angle distribution looks to me like a Gaussian.

ϕ[x_, y_, z_] := (Pi Exp[-Dot[{x, y}, {x, y}]/2] - Pi/2);
V[x_, y_, z_] := Evaluate[Simplify[ComplexExpand[-RotationMatrix[ϕ[x, y, z], {y, -x, 0}].{x, y, 0}/Sqrt[{x, y}.{x, y}]]]];
V[0, 0, z_] := {0, 0, -1};
R = Pi;
P = Select[Flatten[Table[Table[{x, y, 0}, {y, -R, R, R/20}],{x, -R, R, R/20}], 1], X \[Function] -R <= X[] - X[] <= R];
P = Transpose[{{1, -1/2, 0}, {0, Sqrt/2, 0}, {0, 0, 1}}.Transpose[P]];
colfun[x_, y_, z_] := Evaluate[Simplify[ColorData["TemperatureMap"][(Pi/2 - ϕ[x, y, z])/Pi]]];
arrow[p1_, p2_] := {EdgeForm[], FaceForm[colfun @@ p1], Cone[{p1, p2}, 1/24]};
Show[
Graphics3D[{arrow @@@ Transpose[{P, P + 1/4 V @@@ P}]}],
PlotRange -> All,
Lighting -> "Neutral",
Boxed -> False
] • From here we can find the radial profile theta, where Cos[theta] is the z-component of the spin to be Pi + ArcSin@Tanh[(r - c)/w] + ArcSin@Tanh[(r + c)/w] where c and w are magnetic-field dependent parameters. Sep 20 '17 at 12:07