# How I can plot Vector3DPlot?

I want to reproduce the vector 3D plots as shown in the figure. It's in spherical polar coordinates (i.e. vector 3D plot on plane).

The angle [Theta] is spherical coordinate is determined by the solution differential equation us the shooting method.

sols3 = NDSolve[{y[r] == \[Theta]'[r],
y'[r] + (1/r) y[r] - (0.5/r^2) Sin[
2 \[Theta][r]] + (1/r) Sin[\[Theta][r]]^2 -
0.01*Sin[\[Theta][r]] - 0.38*Sin[2 \[Theta][r]] ==
0, \[Theta][0.0000001] == Pi,
y[0.0000001] == -0.768667700}, \[Theta][r], {r, 0.0000001, 18}];
A1 = Plot[Evaluate[\[Theta][r] /. sols3], {r, 0.0000001, 18},
AxesLabel -> {r, \[Theta][r]}, LabelStyle -> "Input",
PlotRange -> All, PlotStyle -> Green]


Phi range from 0 to 2*Pi. The above solution gives [Theta] from Pi to zero with {r, 0.0000001, 18} I think we can extend it from {r, 0.0000001, 18}, and {r, -18,0.0000001}. We cannot have r=0 as the solution diverges. So I put r=0.0000001 instead of zero. My main aim is to get the vector plot shown in the figure using the above solution.

Thanks,

• It looks like you want to plot a 3D (unit) vector field in the z=0 plane. So, at each point (x, y, 0), take the vector {0, 0, 1} and rotate it about the radius vector {x, y, 0} through an angle \[theta][r], which is the function you have calculated. The direction of the rotation is clockwise looking from the origin. The vector to plot at (x, y, 0) will be something like RotationMatrix[ -\[theta][x, y], {x, y, 0}] . {0, 0, 1}. Maybe use ListVectorPlot3D with VectorStyle and VectorColorFunctions to display the vectors. – LouisB Oct 8 at 4:26
• Thanks for the reply. r in my case is coordinate in the cylindrical coordinate system. i.e. r = Sqrt[x^2 + y^2]. If somehow I transform r to x,y then I can have some progress. – physicsu83 Oct 11 at 21:53
• Have you seen this? – Henrik Schumacher Oct 29 at 22:42
• I am decoding the link you mentioned. If I have any question I will ask. Thanks. – physicsu83 Oct 30 at 16:30