Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. documentclass{standalone}
  2. usepackage{tikz}
  3. usepackage{xcolor}
  4. usetikzlibrary{calc,patterns,decorations.pathmorphing}
  5. usetikzlibrary{decorations.markings,positioning}
  6.  
  7. begin{document}
  8. tikzset{spring/.style={thick,decorate,decoration={zigzag,pre
  9. length=0.3cm,post
  10. length=0.3cm,segment length=6}},
  11. short spring/.style={thick,decorate,decoration={zigzag,pre
  12. length=0.05cm,post
  13. length=0.05cm,segment length=6}},
  14. damper/.style={thick,decoration={markings,
  15. mark connection node=dmp,
  16. mark=at position 0.5 with
  17. {
  18. node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
  19. width=15pt,minimum height=3pt,draw=none] {};
  20. draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south
  21. west) -- ($(dmp.north west)+(2pt,0)$);
  22. draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
  23. }
  24. }, decorate},
  25. ground/.style={fill,pattern=north east lines,draw=none,minimum
  26. width=0.75cm,minimum height=0.3cm},
  27. ground_magenta/.style={fill,pattern=north east lines,pattern
  28. color=magenta,draw=none,minimum
  29. width=0.75cm,minimum height=0.3cm}}
  30.  
  31. begin{tikzpicture}[every node/.style={draw,outer
  32. sep=0pt,thick},font=sffamily]
  33. node[minimum width=2cm,minimum height=0.3cm] (beam1) {};
  34. node[right of= beam1,node distance=2cm,minimum width=2cm,minimum
  35. height=0.3cm] (beam2) {};
  36. node[right of= beam2,node distance=2cm,minimum width=2cm,minimum
  37. height=0.3cm] (beam3) {};
  38. node[right of= beam3,node distance=2cm,minimum width=2cm,minimum
  39. height=0.3cm] (beam4) {};
  40.  
  41. node (ground1) at (beam1.south west) [ground,yshift=-3cm,anchor=north] {};
  42. draw (ground1.north west) -- (ground1.north east);
  43. draw [thick,decorate,decoration={zigzag,pre
  44. length=1cm,post length=1cm,segment length=6}] (ground1.north) --
  45. ($(beam1.south west)$)
  46. node[midway,right=1mm,draw=none]{};
  47.  
  48. node (ground2) at (beam4.south east) [ground,yshift=-3cm,anchor=north] {};
  49. draw (ground2.north west) -- (ground2.north east);
  50. draw [thick,decorate,decoration={zigzag,pre
  51. length=1cm,post length=1cm,segment length=6}] (ground2.north) --
  52. ($(beam4.south east)$)
  53. node[midway,right=1mm,draw=none]{};
  54.  
  55. node[below of= beam1,node distance=2cm,minimum
  56. height=0.3cm,yshift=0.3cm,xshift=1cm] (m1) {$m_1$};
  57. draw[spring] (beam2.south west) -- (m1.north) node[midway,right=1mm,draw=none]{};
  58. node[below of= beam2,node distance=2cm,minimum height=0.3cm,yshift=0.3cm,xshift=1cm] (m2) {$m_2$};
  59. draw[spring] (beam3.south west) -- (m2.north) node[midway,right=1mm,draw=none]{};
  60. node[below of= beam3,node distance=2cm,minimum height=0.3cm,yshift=0.3cm,xshift=1cm] (m3) {$m_3$};
  61. draw[spring] (beam4.south west) -- (m3.north) node[midway,right=1mm,draw=none]{};
  62.  
  63. draw [-latex] (beam1.north west) ++(0,0.3cm) -- +(0,0.5cm) node[midway,right=0.3mm,draw=none]{$y_{1}$};
  64. draw [-latex] (beam2.north west) ++(0,0.3cm) -- +(0,0.5cm) node[midway,right=0.3mm,draw=none]{$y_{2}$};
  65. draw [-latex] (beam3.north west) ++(0,0.3cm) -- +(0,0.5cm) node[midway,right=0.3mm,draw=none]{$y_{3}$};
  66. draw [-latex] (beam4.north west) ++(0,0.3cm) -- +(0,0.5cm) node[midway,right=0.3mm,draw=none]{$y_{4}$};
  67. draw [-latex] (beam4.north east) ++(0,0.3cm) -- +(0,0.5cm) node[midway,right=0.3mm,draw=none]{$y_{5}$};
  68.  
  69. end{tikzpicture}
  70.  
  71. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement