Tikz:可以使用箭头绘制这种形状吗?

Tikz:可以使用箭头绘制这种形状吗?

在此处输入图片描述

是否可以使用箭头用 Tikz 绘制这种形状(基本上是带有尖头的三个有角度的箭头)?

答案1

像这样吗?

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta}
\makeatletter
\pgfdeclarearrow{
  name = trident,
  parameters = {\the\pgfarrowlength,%
    \the\pgfarrowwidth,%
    \the\pgfarrowlinewidth,%
    \ifpgfarrowopen o\fi},
  setup code = {
    % The different end values:
    \pgfarrowssettipend{\pgfarrowlength}%
    \pgfarrowssetlineend{.01\pgfarrowlength}%
    \pgfarrowssetvisualbackend{-.1\pgfarrowlength}%
    \pgfarrowssetbackend{-.25\pgfarrowlength}%
% The hull
    \pgfarrowshullpoint{\pgfarrowlength}{0pt}% 
    \pgfarrowshullpoint{0pt}{\pgfarrowwidth/2}% 
    \pgfarrowshullpoint{0pt}{-\pgfarrowwidth/2}% 
    \pgfarrowssavethe\pgfarrowlength%
  },
  drawing code = {%
    %\edef\pgf@orig@linewidth{\the\pgflinewidth}%
    \pgfutil@tempdima=-\pgfarrowlinewidth
    \advance\pgfutil@tempdima by 0.5\pgflinewidth
    \pgfpathmoveto{\pgfqpoint{0pt}{\pgfutil@tempdima}}%
    \pgfpathlineto{\pgfpoint{0pt}{0.5\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.9\pgfarrowlength}{0.5\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{\pgfarrowlength}{0.4\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.9\pgfarrowlength}{0.3\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.2\pgfarrowlength}{0.3\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.2\pgfarrowlength}{0.1\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.9\pgfarrowlength}{0.1\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{\pgfarrowlength}{0pt}}%
    \pgfpathlineto{\pgfpoint{0.9\pgfarrowlength}{-0.1\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.2\pgfarrowlength}{-0.1\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.2\pgfarrowlength}{-0.3\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.9\pgfarrowlength}{-0.3\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{\pgfarrowlength}{-0.4\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0.9\pgfarrowlength}{-0.5\pgfarrowwidth}}%
    \pgfpathlineto{\pgfpoint{0pt}{-0.5\pgfarrowwidth}}%
    \iftikz@mode@double
        \pgflineto{\pgfqpoint{0pt}{-\pgfutil@tempdima}}%
    \else
        \pgfpathclose
    \fi
    \tikz@mode@doublefalse
    \pgfsetlinewidth{+\pgfarrowlinewidth}%
    \ifpgfarrowopen\pgfusepathqstroke\else\ifdim\pgfarrowlinewidth>0pt\pgfusepathqfillstroke\else\pgfusepathqfill\fi\fi
},
  defaults = { length = 12pt,width=8pt,line width=0.4pt,open}
}
\makeatother
\begin{document}
\begin{tikzpicture}
    \draw [double distance=2pt,-{trident[open,line width=0.4pt]}] 
    (0,0) -- (70:2);
    \draw [-{trident[width=10pt,length=14pt]}] (2,0) -- ++(70:2);
\end{tikzpicture}
\end{document}

在此处输入图片描述

可以引入更多参数。我只是不知道你的想法是什么。

相关内容