梯形节点,带箭头连接节点

梯形节点,带箭头连接节点

我想要绘制下图:

在此处输入图片描述

我的工作代码如下:

\documentclass{beamer}

\usepackage{tikz,tikz-cd,pgf,graphicx,}

\usetikzlibrary{calc, arrows, backgrounds, fit, positioning, quotes, shapes}

\begin{document}
    \begin{frame}
        \frametitle{Introduction}
        \framesubtitle{Background and motivation}
        \tikzstyle{block} = [trapezium, draw, minimum width=5cm, minimum height=1cm,
        trapezium left angle=60, trapezium right angle=120]
        
        \begin{figure}[!h]
            \centering
            \resizebox{.9\linewidth}{!}{
                \begin{tikzpicture}[thick]
                    %automaton
                    \node [block] (x) {$x$};
                    \node [block, right=of x, xshift=2cm] (Bx) {$B\mathbf{x}$};
                    \node [block, right=of Bx, xshift=2cm] (ABx) {$A(B\mathbf{x})$};
                    
                \end{tikzpicture}
            }
        \end{figure}
    \end{frame}
\end{document}

其结果如下:

在此处输入图片描述

我该如何实现这一点?请帮忙。

答案1

给你一个参考:

在此处输入图片描述

\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\frametitle{Introduction}
\framesubtitle{Background and motivation}
\begin{figure}[!h]
\centering
\begin{tikzpicture}
\fill[cyan!30,xslant=.5] (0,0) rectangle (2.5,1.5);
\fill (1.5,1) coordinate (Bx) node[below]{Bx} circle(2pt);

\begin{scope}[xshift=4cm]
\fill[cyan!30,xslant=.5] (0,0) rectangle (2.5,1.5);
\fill (1.5,1) coordinate (ABx) node[below right]{A(Bx)} circle(2pt);
\end{scope}

\begin{scope}[xshift=-4cm]
\fill[cyan!30,xslant=.5] (0,0) rectangle (2.5,1.5);
\fill (1.5,1) coordinate (x) node[below left]{x} circle(2pt);
\end{scope}

\draw[teal,-latex,shorten >=2mm,shorten <=2mm] (Bx) to[bend left=40] 
node[black,midway,below]{by A} 
node[black,midway,above]{Multiplication} 
(ABx);

\draw[teal,-latex,shorten >=2mm,shorten <=2mm] (x) to[bend left=40] 
node[black,midway,below]{by B} 
node[black,midway,above]{Multiplication} 
(Bx);
\end{tikzpicture}
\end{figure}
\end{frame}
\end{document}

相关内容