完成图像

完成图像

我有这个图像:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,patterns,decorations.pathmorphing,decorations.markings}

\begin{document}
\tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post length=0.3cm,segment length=6}]
\tikzstyle{damper}=[thick,decoration={markings,  
mark connection node=dmp,
mark=at position 0.5 with 
{
 \node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum 
 width=15pt,minimum height=3pt,draw=none] {};
\draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
\draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
 }
}, decorate]
\tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.75cm,minimum height=0.3cm]

\begin{tikzpicture}[every node/.style={draw,outer sep=0pt,thick}]

\node (beam1) [minimum width=2cm,minimum height=0.3cm] {};
\node (beam2) [minimum width=2cm,minimum height=0.3cm] {};
\node (beam3) [right of = beam2,minimum width=2cm,minimum height=0.3cm] {};
\node (beam4) [right of = beam3,minimum width=2cm,minimum height=0.3cm] {};

\node (ground1) at (beam1.south west) [ground,yshift=-2cm,anchor=north] {};
\draw (ground1.north west) -- (ground1.north east);
\draw [spring] (ground1.north) -- ($(beam1.south west)$);


\node (ground3) at (beam4.south east) [ground,yshift=-2cm,anchor=north] {};
\draw (ground3.north west) -- (ground3.north east); 
\draw [spring] (ground3.north) -- ($(beam4.south east)$);
\node (load_cell) [above of=beam4,minimum width=1cm,minimum height=0.5cm] {};
\draw [spring] (beam4.north) -- (load_cell.south);
\draw [-latex] (beam1.north west) ++(0,0.2cm) -- +(0,0.6cm);
\draw [-latex] (beam2.north west) ++(0,0.2cm) -- +(0,0.6cm);
\draw [-latex] (beam3.north west) ++(0,0.2cm) -- +(0,0.6cm);

\draw [-latex] (beam4.north west) ++(0,0.2cm) -- +(0,0.6cm);
\draw [-latex] (beam4.north east) ++(0,0.2cm) -- +(0,0.6cm);

\end{tikzpicture}

\end{document}  

我想让它看起来像: 在此处输入图片描述

你能帮助我改进代码并实现目标吗?我想保留黑色箭头并添加弯曲的箭头,颜色仍为黑色。

答案1

您可能需要删除red指令。我也不知道弯曲的箭头应该是什么样子。

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,patterns,decorations.pathmorphing,decorations.markings,positioning}

\begin{document}
\tikzset{spring/.style={thick,decorate,decoration={zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6}},
short spring/.style={thick,decorate,decoration={zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6}},
damper/.style={thick,decoration={markings,  
mark connection node=dmp,
mark=at position 0.5 with 
{
 \node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum 
 width=15pt,minimum height=3pt,draw=none] {};
\draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
\draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
 }
}, decorate},
ground/.style={fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm}}

\begin{tikzpicture}[every node/.style={draw,outer sep=0pt,thick},font=\sffamily]

\node (beam1) [minimum width=2cm,minimum height=0.3cm] {};
\node (beam2) [minimum width=2cm,minimum height=0.3cm] {};
\node (beam3) [right of = beam2,minimum width=2cm,minimum height=0.3cm] {};
\node (beam4) [right of = beam3,minimum width=2cm,minimum height=0.3cm] {};

\node (ground1) at (beam1.south west) [ground,yshift=-2cm,anchor=north] {};
\draw (ground1.north west) -- (ground1.north east);
\draw [spring] (ground1.north) -- ($(beam1.south west)$) node[red,midway,left=1mm,draw=none]{k1};


\node (ground3) at (beam4.south east) [ground,yshift=-2cm,anchor=north] {};
\draw (ground3.north west) -- (ground3.north east); 
\draw [spring] (ground3.north) -- ($(beam4.south east)$) 
node[red,midway,right=1mm,draw=none]{k2};
\node (load_cell) [above of=beam4,minimum width=1cm,minimum height=0.5cm] {};
\draw [short spring] (beam4.north) -- (load_cell.south);
\draw [-latex] (beam1.north west) ++(0,0.2cm) -- +(0,0.6cm);
\draw [-latex] (beam2.north west) ++(0,0.2cm) -- +(0,0.6cm);
\draw [-latex] (beam3.north west) ++(0,0.2cm) -- +(0,0.6cm);

\draw [-latex] (beam4.north east) ++(0,0.2cm) -- +(0,0.6cm);
%
\draw [red,-latex] (beam2.north west) ++(0,0.2cm) arc(-45:0:0.6);
\draw [red,-latex] (beam3.north west) ++(0,0.2cm) arc(-45:0:0.6);

\node[red,below=1mm of beam4.south west,draw=none]{E,A,L,I};

\draw [red,-latex] (beam4.north west) ++(0,0.2cm) arc(-45:0:0.6);
\draw [red,-latex] (beam4.north east) ++(0,0.2cm) arc(-45:0:0.6);

\end{tikzpicture}

\end{document}  

在此处输入图片描述

相关内容