如何才能使箭头正确显示在圆弧曲线上?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings,calc,fadings,decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}
\begin{document}
\begin{tikzpicture}[line cap = round, line join = round, >=triangle 45]
\draw[->] (-3,0) -- (3,0) node[above, scale = .75] {$\rho$};
\draw[->] (0,0) -- (0,4) node[right, scale = .75] {$z$};
\draw (-3,4) parabola bend (0,0) (3,4);
\filldraw[top color = yellow!70, bottom color = green!80] (1.5,1) circle (.15cm);
\draw[fill = white] (-.15,3) arc (135:340:.2cm and .1cm);
\draw[->] (-.15,3) arc (135:340:.2cm and .1cm);
\end{tikzpicture}
\end{document}
答案1
解决方案改编自Peter Grill 的:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings,calc,fadings,decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}
\newcommand{\AxisRotator}[1][rotate=0]{%
\tikz \draw[x=.5em,y=1.25em,line width=.2ex,-stealth,#1] (0,0) arc (-150:150:1 and 1);%
}
\begin{document}
\begin{tikzpicture}[line cap = round, line join = round, >=triangle 45]
\draw[->] (-3,0) -- (3,0) node[above, scale = .75] {$\rho$};
\draw[->] (0,0) -- (0,4) node[right, scale = .75] {$z$};
\draw (-3,4) parabola bend (0,0) (3,4);
\filldraw[top color = yellow!70, bottom color = green!80] (1.5,1) circle (.15cm);
\draw (0,3) node {\AxisRotator[rotate=-90]};
\end{tikzpicture}
\end{document}