tikz 中的特殊箭头

tikz 中的特殊箭头

我在一本书中找到了这张图片,想重新创建它。节点没有问题,但我找不到重新创建这些箭头的方法。图形不必相同,但必须看起来有点像。

图片截图

答案1

也许是这样的?

\documentclass[border = 4pt, tikz]{standalone}

\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{calc}
\tikzstyle{myarrow} = [line width = 1mm, draw = gray!40, -triangle 45, postaction={draw, line width = 2mm, shorten >=3mm, -}]


\begin{document}

\begin{tikzpicture}[outer sep = 2pt]
  \node[trapezium, trapezium angle = 60, minimum width = 1cm, draw, align = center, fill = cyan!10] (agent) {Agent};

  \node[below = of agent, draw, rounded corners, minimum width = 1cm, minimum height = 0.8cm, fill = green!10] (environment) {Environment};

  \draw[myarrow, rounded corners] (environment.west) -- ([xshift = -1cm]environment.west) |- (agent) 
  node[pos = 0.25, left, align = center]{State: s \\ \color{red}{Reward : r}};

  \draw[myarrow, rounded corners] (agent.east) -- ([xshift = 1.5cm]agent.east) |- (environment) 
  node[pos = 0.25, right, align = center]{Actions: a};

\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容