Phase portrait on the sphere
I have that $(x,y)\in S^1$, i.e. on the sphere, and in Mathematica, the ODE system
f = x^3 - x y^2 + y^3 ;
xdot = x (-x + f);
ydot = y (x - y + f);
vector = {xdot, ydot};
How can I plot the phase portrait on $S^1$?
I do not know how to plot this in Mathematica.
Of course there is the StreamPlot function and I can do
StreamPlot[{ x (-x + f), y (x - y + f)},{x,-Pi,Pi},{y,-Pi,Pi}]
which gives
But I am only interested in the dynamics which happens directly on $S^1$.
How can I filter that out to get something like sketched here:
Answers 1
So, one way to do this is to project your vector field (pointwise) onto the vector field that goes around the origin, and then only plot the streams that go through points on the circle—we'll take a few via
CirclePoints
to be sure we get the whole of the unit circle.CirclePoints
(e.g.11
) can cause streams to go through points not on the circle. I'm not sure why this happens, and it might be a bug.)Let me know if you'd like me to explain why this works or what it's doing any further! :)
By the way, here's what I get by completing the specification to
StreamPoints -> {CirclePoints[20], Automatic, [email protected] Pi}
:I'm not sure if this is meaningful or better, but thought I'd add it!