形成弧形箭頭並保持正確的箭頭方向

形成弧形箭頭並保持正確的箭頭方向

我有

\draw[draw=black!80,solid, -triangle 90,fill=black!80] (2.6, 4) -- (3.3, 4);

我希望端點位於它們所在的位置,但我需要它呈弧形。我該怎麼做呢?

編輯: 我正在尋找這樣的東西:

\draw [->] (0,0) arc (180:30:10pt);

在此輸入影像描述

類似於彎曲的箭頭,除了我擁有的端點。不過,我需要我的三角形方向正確。

它不必看起來沿著圓的頂部,它只需要以曲線方式向上向下(這是因為目前有另一條線在直線路徑上)。所以,本質上,我試著從精確的起點,到精確的端點。一條線已經從 A 到 B 呈直線。因此我需要彎曲箭頭。

答案1

我不知道是否存在任何 TikZ 前端命令(我猜有但我無法理解)。您可以使用較低層級的命令來取得在線上的節點邊界點,就像您在與節點形狀相交的來源節點到目標節點之間繪製假設的邊界點一樣。

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\node[draw] (a) at (0,0) {A};
\node[draw,circle] (b) at (2,1) {B};
\draw[-latex] (a) -- (b);

\pgfcoordinate{c}{% a coordinate named c at....
    \pgfpointshapeborder{a}{% the point on the border of node a
        \pgfpointanchor{b}{center}% that sees the center anchor of node b
    }
}
% Same for the border point of b
\pgfcoordinate{d}{\pgfpointshapeborder{b}{\pgfpointanchor{a}{center}}}

% Let's see if we make sense
\draw (c) edge[-latex,bend right] (d);
\end{tikzpicture}
\end{document}

在此輸入影像描述

我不對箭頭的醜陋負責。小心你的願望:)

相關內容