Plotting loops: trajectories have directions.
How to plot the following figures using tikz
1st I start to plot the 2nd fig using the code
\begin{tikzpicture}
\draw (3,2) ellipse (.5cm and .25cm);
\draw (2.9,1.9) to [controls=+(90:1) and +(90:1)] (3,2);
\end{tikzpicture}
To plot the last fig, I have used.
\begin{tikzpicture}
\draw (.5,0) .. controls (3,3) and (-1,3) .. (1.5,0);
\end{tikzpicture}
But unable to plt the outer and inside curves and the arrows.
Using Hobby I wrote
\begin{tikzpicture}[use Hobby shortcut]
\draw (-.3 ,1).. (0, 0) .. ( 1.2 , 0 ) .. ( 0 , 0 ) .. (-.3 ,-1);
\draw (.45, 0) .. ( .9 , 0 ) .. ( .6 , 0 ) .. ( .7 , -0.01);
\draw (-.15, 1.2).. (-.01, .2) ..(.01, .22).. (.6, .1) .. ( 1.3 , 0 ) .. ( 0 , -.1 ) .. (-.3 ,-1.2);
\end{tikzpicture}
But problem for the outer curve persists. What to do?
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{hobby,decorations.markings}
\begin{document}
\begin{tikzpicture}[
use Hobby shortcut,
vec1/.style={
decorate,
decoration={
markings, % v-- can fine-tune arrow position and rotation
mark=at position 0.1 with {\arrow[rotate=5]{stealth}},
}
},
vec2/.style={
decorate,
decoration={
markings, % v-- here again---fine-tune as needed
mark=at position 0.080 with {\arrow{stealth}},
mark=at position 0.206 with {\arrow{stealth reversed}},
mark=at position 0.800 with {\arrow{stealth reversed}},
mark=at position 0.930 with {\arrow{stealth}},
}
},
]
% filled points
%\fill (0,0) circle (1pt);
%\fill (2,0) circle (1pt);
\draw (0.4, 0) .. (0.8, 0.3) .. (1.0, 0) .. (0.4, 0);
\draw (-.3 ,1).. (0, 0) .. ( 1.2 , 0 )
\draw (-.3 ,-1).. (0, 0) .. ( 1.2 , 0 ) .. ( 0 , 0 ) ;
\draw (.5, 0) .. ( .8 , 0 ) .. ( .6 , 0 ) .. ( .7 , -0.012);
\draw (-.1, 1)..(-.08, .7)..(-.05, .4)..( .1 , .4 )..( .7 , .6 )..( 1.4 , 0 )..( .7 , -.6 )..( .2 , -.4 )..(-.1,-.5)..(-.11 ,-.8);
\end{tikzpicture}
\end{document}
Best Answer
Here's a solution using
hobby
for the third image. This should be enough to get you started on the other two.Code
Output