2

I was trying to edit this answer a bit, I wanted to put 5 or 6 arrows on the red and blue lines, I couldn't do it. The only thing I managed to do is this: (a lot of arrows come out and it's not what I want) any ideas how to fix this?

I have also tried to make the red and blue lines respect the sphere, that is to say that it is more transparent when the graph is passing behind the sphere and it is normal when it is in front, but I have not achieved anything.

\documentclass{standalone}

\usepackage{pst-ode,pst-3dplot}

\begin{document}

\begin{pspicture}(-1.1,-1.1)(1.1,1.1)%

% Sphere \pstThreeDSpherelinewidth=0.0001pt,strokeopacity=0.3,linecolor=gray,SegmentColor={[cmyk]{0.0,0.0,0.0,0.2}}{1}

% lower half-space \pstODEsolve[algebraic]{XYZa}{0 1 2}{0}{35}{500}{1e-9 0.0 -1.0}{ -x[1]+x[0]x[2]^2 | x[0]+x[1]x[2]^2 | -x[2]*(x[0]^2+x[1]^2) }

\psset{arrowscale=0.4} \listplotThreeD[linecolor=blue,linewidth=0.3pt,ArrowInside=->,ArrowInsidePos=1]{XYZa}

% upper half-space \pstODEsolve[algebraic]{XYZb}{0 1 2}{0}{35}{500}{1e-9 0.0 1.0}{ -x[1]+x[0]x[2]^2 | x[0]+x[1]x[2]^2 | -x[2]*(x[0]^2+x[1]^2) } \listplotThreeD[linecolor=red,linewidth=0.4pt,ArrowInside=->,ArrowInsidePos=1]{XYZb} \end{pspicture}

\end{document}

Output: enter image description here

Zaragosa
  • 599

1 Answers1

2

This solves the first issue of the question, getting a finite number of arrows.

The command \pstODEsolve can be called with an empty initial conditions argument. Then, it uses the last computed state vector from the previous call as initial condition for the current call. See pst-ode manual, second last paragraph on pg. 3.

This method is used to divide the integration interval into several sub-intervals. Note that the initial interval was chosen to be rather large, 0 ≤ t ≤ 20, because the solution does not evolve that fast at the poles; subsequent intervals are Δt=1.

enter image description here

Typeset with lualatex or latex+dvips+ps2pdf.

\documentclass{standalone}

\usepackage{pst-ode,pst-3dplot}

\begin{document}

\begin{pspicture}(-1.1,-1.1)(1.1,1.1)%

% Sphere \pstThreeDSpherelinewidth=0.0001pt,strokeopacity=0.3,linecolor=gray,SegmentColor={[cmyk]{0.0,0.0,0.0,0.2}}{1}

% lower half-space % initial interval 0 ≤ t ≤ 20 \pstODEsolve[algebraic]{XYZ}{0 1 2}{0}{20}{150}{1e-9 0.0 -1.0}{ -x[1]+x[0]x[2]^2 | x[0]+x[1]x[2]^2 | -x[2](x[0]^2+x[1]^2) } \listplotThreeD[linecolor=blue,linewidth=0.4pt,arrows=->]{XYZ} % subsequent intervals Δt=1 \multido{\iStart=20+1,\iEnd=21+1}{11}{ \pstODEsolve[algebraic]{XYZ}{0 1 2}{\iStart}{\iEnd}{50}{ }{ -x[1]+x[0]x[2]^2 | % empty init. cond. ---^ x[0]+x[1]x[2]^2 | -x[2](x[0]^2+x[1]^2) } \listplotThreeD[linecolor=blue,linewidth=0.4pt,arrows=->]{XYZ} }

% upper half-space \pstODEsolve[algebraic]{XYZ}{0 1 2}{0}{20}{150}{1e-9 0.0 1.0}{ -x[1]+x[0]x[2]^2 | x[0]+x[1]x[2]^2 | -x[2](x[0]^2+x[1]^2) } \listplotThreeD[linecolor=red,linewidth=0.4pt,arrows=->]{XYZ} \multido{\iStart=20+1,\iEnd=21+1}{11}{ \pstODEsolve[algebraic]{XYZ}{0 1 2}{\iStart}{\iEnd}{50}{}{ -x[1]+x[0]x[2]^2 | x[0]+x[1]x[2]^2 | -x[2](x[0]^2+x[1]^2) } \listplotThreeD[linecolor=red,linewidth=0.4pt,arrows=->]{XYZ} } \end{pspicture}

\end{document}

AlexG
  • 54,894