3D 框和形状 + 定制箭头

3D 框和形状 + 定制箭头

寻求帮助,使 2d 形状变得有点像 3D 形状,因此这是我的尝试:

\documentclass{article}
\usepackage[table,xcdraw,dvipsnames,svgnames,x11names]{xcolor}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows.meta,positioning} 


\tikzset{box/.style={rectangle,draw=black,text=white ,align=center,minimum width=3cm,text width=2.5cm,minimum height=3cm},circle/.style={cylinder, draw, ,shape aspect=0.25,text width=2cm,align= center,minimum width=2.5cm,minimum height=2.5cm,text=white,shape border rotate=90}}

\begin{document}
\begin{tikzpicture}
\draw (0,0) node[box,fill=Tomato] (A){Training images};
\draw (10,0) node[box,fill=Tomato](B) {Testing images};
\draw (0,-4) node[circle,fill=Turquoise](C) {Features \\Vector\\Collection};
\draw (10,-4) node[box,fill=Turquoise] (D){Feature Vector};
\draw (5,-4) node[box,shape=diamond,,fill=Purple,aspect=-0.9](E) {Feature \\ extraction\\ Component};
\draw (5,-7) node[box,rounded corners=0.5cm,fill=RubineRed,minimum height=1.5cm](F) {Image classifier};
\draw (5,-10) node[box,minimum height=1.5cm,fill=WildStrawberry](G) {Results};
%arrows 
\draw [-Stealth] [line width=3pt,draw=red](A)--(C);
\draw [-Stealth] [line width=3pt,draw=red](B)--(D);
\draw [] [line width=1pt,draw=red](D)--(E);
\draw [] [line width=1pt,draw=red](C)--(E);
\draw [-Stealth] [line width=2pt,draw=red](C)--(F.mid west);
\draw [-Stealth] [line width=2pt,draw=red](D)--(F.mid east);
\draw [-Stealth] [line width=3pt,draw=red](F)--(G);    
\end{tikzpicture}
\end{document}

我要找的是这样的

在此处输入图片描述

提前谢谢大家!

答案1

\documentclass[tikz, border=1cm, svgnames]{standalone}
\usetikzlibrary{shadings, shapes.geometric, shadows}
\tikzset{
box/.style={
drop shadow={shadow xshift=1ex, shadow yshift=-0.4ex},
rectangle,
draw,
text=white,
align=center,
minimum width=3cm,
text width=2.5cm,
minimum height=3cm,
top color=#1,
bottom color=#1!70!black,
path picture={
\draw[line width=8pt, #1!60!black] (path picture bounding box.south west) rectangle (path picture bounding box.north east);
\clip (path picture bounding box.north west) -- (path picture bounding box.north east) -- (path picture bounding box.center) --cycle;
\draw[line width=8pt, #1!60] (path picture bounding box.north west) -- (path picture bounding box.north east);
}},
diamond/.style={
box=#1,
shape=diamond,
path picture={
\draw[line width=8pt, #1!60!black] (path picture bounding box.west) -- (path picture bounding box.south) -- (path picture bounding box.east);
\clip (path picture bounding box.west) -- (path picture bounding box.north) -- (path picture bounding box.east) --cycle;
\draw[line width=8pt, #1!60] (path picture bounding box.west) -- (path picture bounding box.north) -- (path picture bounding box.east);
}},
roundbox/.style={
box=#1,
minimum height=1.5cm,
rounded corners=0.5cm,
top color=#1!60,
bottom color=#1!60!black,
path picture={
\fill[top color=#1, bottom color=#1!70!black, rounded corners=0.5cm-4pt] ([shift={(4pt,4pt)}]path picture bounding box.south west) rectangle ([shift={(-4pt,-4pt)}]path picture bounding box.north east);
}},
cylinder/.style={
box=#1,
shape=cylinder, shape aspect=0.25, shape border rotate=90,
path picture={
}},
}
\begin{document}
\begin{tikzpicture}
\node[box=Tomato] (A) at (0,0) {This tomato is liverish};
\node[diamond=DarkOrchid] (B) at (4,0) {This orchid is ailing};
\node[roundbox=LightSalmon] (C) at (0,-4) {This salmon is infirm};
\node[cylinder=GhostWhite, text=black] (D) at (4,-4) {This ghost is faded};
\end{tikzpicture}
\end{document}

具有 3D 效果和高光的形状

相关内容