Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. documentclass[tikz,border=3.14mm]{standalone}
  2. usetikzlibrary{patterns,decorations.pathmorphing,positioning}
  3. begin{document}
  4. begin{tikzpicture}[every node/.style={outer sep=0pt},thick,
  5. mass/.style={draw,thick},
  6. spring/.style={thick,decorate,decoration={zigzag,pre length=0.3cm,post
  7. length=0.3cm,segment length=6}},
  8. ground/.style={fill,pattern=north east lines,draw=none,minimum
  9. width=0.75cm,minimum height=0.3cm},
  10. dampic/.pic={fill[white] (-0.1,-0.3) rectangle (0.3,0.3);
  11. draw (-0.3,0.3) -| (0.3,-0.3) -- (-0.3,-0.3);
  12. draw[line width=1mm] (-0.1,-0.3) -- (-0.1,0.3);}]
  13.  
  14. node[mass,minimum width=3.5cm,minimum height=2cm,fill=green!50!black] (m1) {$m_1$};
  15. node[mass,minimum width=3.5cm,minimum height=2cm,fill=green!50!black,right=1.5cm of
  16. m1] (m2) {$m_2$};
  17. node[mass,minimum width=2.8cm,minimum height=1.5cm,fill=red!70,right=1.5cm of
  18. m2] (ma) {$m_a$};
  19. node[left=2cm of m1,ground,minimum width=3mm,minimum height=2.5cm] (g1){};
  20. draw (g1.north east) -- (g1.south east);
  21.  
  22. draw[spring] ([yshift=3mm]g1.east) coordinate(aux)
  23. -- (m1.west|-aux) node[midway,above=1mm]{$k_1$};
  24. draw[spring] (m1.east|-aux) -- (m2.west|-aux) node[midway,above=1mm]{$k_2$};
  25. draw[spring] (m2.east|-aux) -- (ma.west|-aux) node[midway,above=1mm]{$k_a$};
  26.  
  27. draw ([yshift=-3mm]g1.east) coordinate(aux')
  28. -- (m1.west|-aux') pic[midway]{dampic} node[midway,below=3mm]{$c_1$}
  29. (m1.east|-aux') -- (m2.west|-aux') pic[midway]{dampic} node[midway,below=3mm]{$c_2$}
  30. (m2.east|-aux') -- (ma.west|-aux') pic[midway]{dampic} node[midway,below=3mm]{$c_a$};
  31.  
  32. foreach X in {1,2}
  33. {draw[thin] (mX.north) -- ++ (0,1) coordinate[midway](auxX);
  34. draw[latex-] (auxX) -- ++ (-0.5,0) node[above]{$F_X$};
  35. draw[thin,dashed] (mX.south) -- ++ (0,-1) coordinate[pos=0.85](aux'X);
  36. draw[latex-] (aux'X) -- ++ (-1,0) node[midway,above]{$x_X$}
  37. node[left,ground,minimum height=7mm,minimum width=1mm] (g'X){};
  38. draw[thick] (g'X.north east) -- (g'X.south east);
  39. }
  40.  
  41. draw[thin,dashed] (ma.south) -- ++(0,-1.2);
  42. draw[latex-] (ma.south |- aux'1) -- ++ (-1.5,0) coordinate(aux3)
  43. node[midway,above]{$x_d$};
  44. draw[thin] ([yshift=-2mm]aux3) |- ++ (-1,0.5) -| (m2.-40);
  45. end{tikzpicture}
  46. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement