\begin{tikzpicture}
\draw[gray!50, very thick,, fill = blue!30,rounded corners]
(0,0) rectangle (2.5,1.5)node[pos=.5]{$\begin{array}{c}\text{\textcolor{blue!75}{\textbf{Combinatorial}}} \\ \text{\textcolor{blue!75}{\textbf{Problem}}}\end{array}$}
;
\draw[->, thick, blue] (2.7,0.75) -- (3.8,0.75)
;
\draw[gray!50, very thick, fill = blue!30,rounded corners]
(4,0) rectangle (6.5,1.5)node[pos=.5]{$\begin{array}{c}\text{\textcolor{blue!75}{\textbf{Boolean}}} \\ \text{\textcolor{blue!75}{\textbf{Expression(s)}}}\end{array}$}
;
\draw[->, thick, blue] (6.7,0.75) -- (7.8,0.75)
;
\draw[gray!50, very thick, fill = blue!30,rounded corners]
(8,0) rectangle (10.5,1.5)node[pos=.5]{$\begin{array}{c}\text{\textcolor{blue!75}{\textbf{Conjuctive}}} \\ \text{\textcolor{blue!75}{\textbf{Normal Forms}}}\end{array}$}
;
\draw[->, thick, blue] (9.75,-0.2) -- (9.75,-0.-1.8)
;
\draw[gray!50, very thick,, fill = blue!30,rounded corners]
(0,-3.5) rectangle (2.5,-2)node[pos=.5]{$\begin{array}{c}\text{\textcolor{blue!75}{\textbf{Problem}}} \\ \text{\textcolor{blue!75}{\textbf{Solution}}}\end{array}$}
;
\draw[<-, thick, blue] (2.7,-2.75) -- (3.8,-2.75)
;
\draw[gray!50, very thick, fill = blue!30,rounded corners]
(4,-3.5) rectangle (6.5,-2)node[pos=.5]{$\begin{array}{c}\text{\textcolor{blue!75}{\textbf{Assignment of}}} \\ \text{\textcolor{blue!75}{\textbf{Variable(s)}}}\end{array}$}
;
\draw[<-, thick, blue] (6.7,-2.75) -- (7.8,-2.75)
;
\draw[gray!50, very thick, fill = blue!30,rounded corners]
(8,-3.5) rectangle (10.5,-2)node[pos=.5]{$\begin{array}{c}\text{\textcolor{blue!75}{\textbf{SAT}}} \\ \text{\textcolor{blue!75}{\textbf{Solvers}}}\end{array}$}
;
\end{tikzpicture}
答案1
您可以使用库single arrow
中的形状shapes.arrows
。此外,如果您使用矩阵等,事情可能会变得更容易。
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{amsmath}
\usetikzlibrary{matrix,shapes.arrows,shadows.blur}
\begin{document}
\begin{tikzpicture}[box/.style={align=center,text width=2.7cm,
text=blue!75,fill = blue!30,rounded corners,draw=gray!50,
very thick,font=\bfseries,minimum height=1.5cm,minimum width=2.7cm,blur shadow},
arr/.style={single arrow,fill=blue!40,draw=blue,thick,blur shadow,minimum height=2em,
single arrow head extend=3pt}]
\matrix[matrix of nodes,nodes={box,anchor=center},column sep=1.2cm,row sep=1.2cm] (mat) {
{Combinatorial \\
Problem}
&
{Boolean \\
Expression(s)}
&
{Conjuctive \\
Normal Forms}
\\
{Problem \\
Solution}
&
{Assignment of \\
Variable(s)}
&
{SAT \\
Solvers} \\
};
\path foreach \X [count=\Y] in {2,3}
{(mat-1-\Y) -- (mat-1-\X) node [midway,sloped,arr] {}
(mat-2-\Y) -- (mat-2-\X) node [midway,sloped,arr,shape border rotate=180] {}};
\path (mat-1-3) -- (mat-2-3) node [midway,sloped,arr] {};
\end{tikzpicture}
\end{document}
或者
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{matrix,shapes.arrows,shadows.blur}
\definecolor{myblue}{RGB}{203, 216, 240}
\definecolor{arrb}{RGB}{97, 128, 183}
\definecolor{arrc}{RGB}{71, 95, 139}
\definecolor{nodet}{RGB}{97, 127, 180}
\begin{document}
\begin{tikzpicture}[box/.style={align=center,text width=2.7cm,
text=nodet,fill=myblue,rounded corners,draw=gray!50,
very thick,font=\bfseries\sffamily,minimum height=2cm,minimum width=2.7cm,blur shadow},
arr/.style={single arrow,fill=arrb,draw=arrc,thick,blur shadow,minimum height=2em,
single arrow head extend=3pt}]
\matrix[matrix of nodes,nodes={box,anchor=center},column sep=1.2cm,row sep=1.2cm] (mat) {
{Combinatorial \\ Problem}
&
{Boolean \\ Expression(s)}
&
{Conjuctive \\ Normal Forms}
\\
{Problem \\ Solution}
&
{Assignment of \\ Variable(s)}
&
{SAT \\ Solvers}
\\
};
\path foreach \X [count=\Y] in {2,3}
{(mat-1-\Y) -- (mat-1-\X) node [midway,sloped,arr] {}
(mat-2-\Y) -- (mat-2-\X) node [midway,sloped,arr,shape border rotate=180] {}};
\path (mat-1-3) -- (mat-2-3) node [midway,sloped,arr] {};
\end{tikzpicture}
\end{document}