不容易找到一个最佳实践, 需要大量计算, 用重复绘制的办法也是不得已.
下面也是一个重复绘制的办法.
\documentclass[tikz,border=3.14pt]{standalone}
\usetikzlibrary{bending,arrows.meta,calc,}
\begin{document}
\makeatletter%
\tikzset{%
line arr style/.style={>={Stealth[bend]}, ->, draw, draw opacity=0,},
arc arr style/.style={>={Stealth[bend]}, ->, draw, draw opacity=0,},
ctr arr style/.style={>={Stealth[bend]}, ->, draw, draw opacity=0,},
}
\def\SegmentArrows{}%
\tikzset{%
clear segment arrows/.code={%
\gdef\SegmentArrows{}%
},
every path/.style={clear segment arrows},
}
\def\linearr#1{%
\pgfextra%
%关于起点, 终点 {\tikz@timer@start}{\tikz@timer@end}
%见 \tikz@timer@line 的定义
\pgfpointdiff{\tikz@timer@start}{\tikz@timer@end}%
\pgfpointscale{#1}{}%
\edef\temp@p{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
\pgfpointadd{\tikz@timer@start}{\temp@p}%
\edef\line@arr@endx{\the\pgf@x}\edef\line@arr@endy{\the\pgf@y}%
\pgf@process{\tikz@timer@start}
\edef\line@arr@startx{\the\pgf@x}\edef\line@arr@starty{\the\pgf@y}%
\edef\temp@arrow{\noexpand\path [line arr style]%
(\line@arr@startx,\line@arr@starty) -- (\line@arr@endx,\line@arr@endy);}%
\expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter%
\SegmentArrows\expandafter\expandafter\expandafter{\expandafter\SegmentArrows\temp@arrow}%
\endpgfextra%
}%
\def\arcarr#1{%
\pgfextra%
%关于 \tikz@timer@start@angle, \tikz@timer@end@angle
%见 \tikz@do@arc, \tikz@timer@arc 的定义
%把 #1 看作角度区间上的比例点, 用 \tikz@timer@start@angle+(#1)*(\tikz@timer@end@angle-\tikz@timer@start@angle) 确定一个角度, 定位弧上的一个点
\pgf@process{\tikz@timer@start}%
\edef\arc@arr@startx{\the\pgf@x}\edef\arc@arr@starty{\the\pgf@y}%
\pgfmathsetmacro\arc@arr@t@angle{\tikz@timer@start@angle+(#1)*(\tikz@timer@end@angle-\tikz@timer@start@angle)}%
\edef\temp@arrow{\noexpand\path [arc arr style]%
(\arc@arr@startx,\arc@arr@starty)%
arc (\tikz@timer@start@angle:\arc@arr@t@angle:{\tikz@arc@x} and {\tikz@arc@y});}%
\expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter%
\SegmentArrows\expandafter\expandafter\expandafter{\expandafter\SegmentArrows\temp@arrow}%
\endpgfextra%
}%
\def\ctrarr#1{%
\pgfextra%
%关于控制点
%{\tikz@timer@start}{\tikz@timer@cont@one}{\tikz@timer@cont@two}{\tikz@timer@end}
%见 \tikz@timer@curve 的定义
%
%在 t = #1 处, 把三次贝塞尔曲线分割为左右两段, 取用左段, 控制点是
%\ctr@arr@Q@a@x, \ctr@arr@Q@a@y
%\ctr@arr@Q@b@x, \ctr@arr@Q@b@y
%\ctr@arr@Q@c@x, \ctr@arr@Q@c@y
%\ctr@arr@Q@d@x, \ctr@arr@Q@d@y
%
\pgf@process{\tikz@timer@start}%
\pgfmathsetmacro\ctr@arr@Q@a@x{\the\pgf@x}%
\pgfmathsetmacro\ctr@arr@Q@a@y{\the\pgf@y}%
%
\pgfpointscale{#1}{\tikz@timer@cont@one}%
\pgfgetlastxy{\temp@ax}{\temp@ay}%
\pgfpointscale{1-#1}{\tikz@timer@start}%
\pgfgetlastxy{\temp@bx}{\temp@by}%
\pgfmathsetmacro{\ctr@arr@Q@b@x}{\temp@ax+\temp@bx}%
\pgfmathsetmacro{\ctr@arr@Q@b@y}{\temp@ay+\temp@by}%
%
\pgfpointscale{(#1)*(#1)}{\tikz@timer@cont@two}%
\pgfgetlastxy{\temp@ax}{\temp@ay}%
\pgfpointscale{2*(#1)*(1-#1)}{\tikz@timer@cont@one}%
\pgfgetlastxy{\temp@bx}{\temp@by}%
\pgfpointscale{(1-#1)*(1-#1)}{\tikz@timer@start}%
\pgfgetlastxy{\temp@cx}{\temp@cy}%
\pgfmathsetmacro{\ctr@arr@Q@c@x}{\temp@ax+\temp@bx+\temp@cx}%
\pgfmathsetmacro{\ctr@arr@Q@c@y}{\temp@ay+\temp@by+\temp@cy}%
%
\pgfpointscale{(#1)*(#1)*(#1)}{\tikz@timer@end}%
\pgfgetlastxy{\temp@ax}{\temp@ay}%
\pgfpointscale{3*(#1)*(#1)*(1-#1)}{\tikz@timer@cont@two}%
\pgfgetlastxy{\temp@bx}{\temp@by}%
\pgfpointscale{3*(#1)*(1-#1)*(1-#1)}{\tikz@timer@cont@one}%
\pgfgetlastxy{\temp@cx}{\temp@cy}%
\pgfpointscale{(1-#1)*(1-#1)*(1-#1)}{\tikz@timer@start}%
\pgfgetlastxy{\temp@dx}{\temp@dy}%
\pgfmathsetmacro\ctr@arr@Q@d@x{\temp@ax+\temp@bx+\temp@cx+\temp@dx}%
\pgfmathsetmacro\ctr@arr@Q@d@y{\temp@ay+\temp@by+\temp@cy+\temp@dy}%
%
\edef\temp@arrow{\noexpand\path [ctr arr style]%
(\ctr@arr@Q@a@x pt,\ctr@arr@Q@a@y pt) .. controls (\ctr@arr@Q@b@x pt,\ctr@arr@Q@b@y pt)%
and (\ctr@arr@Q@c@x pt,\ctr@arr@Q@c@y pt) .. (\ctr@arr@Q@d@x pt,\ctr@arr@Q@d@y pt);}%
\expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter%
\SegmentArrows\expandafter\expandafter\expandafter{\expandafter\SegmentArrows\temp@arrow}%
\endpgfextra%
}%
\makeatother%
%以上定义的命令,
% \linearr{0.6} 只能用在 lineto 构造片段的后面,
% \arcarr{0.6} 只能用在 arc 构造片段的后面,
% \ctrarr{0.35} 只能用在 curveto 构造片段的后面,
% 如下所示
%然后使用 \SegmentArrows 绘制箭头
%实际上还是重复绘制需要添加箭头的路径的一部分
%因为 TikZ 的一个路径只能在起点或终点处加箭头, 关于箭头形态的计算有点复杂,
%为了减少麻烦, 不得已使用重复绘制一段路径的办法加箭头
\begin{tikzpicture}
\def\eps{0.3}
\def\bbeta{17.25} % β = 2·arcsin(ε/2)
\def\bhalf{8.63} % β/2
\draw[ draw=red, ]
(-1+\eps, 0)
-- (1-\eps, 0) \linearr{0.6}
arc (180:90+\bhalf:\eps)
arc (\bbeta:90-\bbeta:1) \arcarr{0.6}
arc (-\bhalf:-180+\bhalf:\eps) \arcarr{0.6}
arc (90+\bbeta:180-\bbeta:1) \arcarr{0.6}
arc (90-\bhalf:0:\eps)
-- cycle;
\SegmentArrows
\begin{scope} [xshift=2cm, rotate=-20]
\draw (0,0) .. controls (0,2) and (1,0) .. (2,1) \ctrarr{0.35} ;
\SegmentArrows
\end{scope}
\end{tikzpicture}
\end{document}


















问 绘制围道时,处理均匀地添加曲线上的箭头的最佳实践?