Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 2.52 KB | None | 0 0
  1. \documentclass{article}
  2. \usepackage{tikz}
  3. \usetikzlibrary{calc,patterns,
  4.                 decorations.pathmorphing,
  5.                 decorations.markings}
  6.  
  7. \begin{document}
  8. \begin{tikzpicture}
  9.  
  10. \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post
  11. length=0.3cm,segment length=10,amplitude=0.3cm}]
  12.  
  13. \tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum
  14. width=0.75cm,minimum height=0.3cm]
  15.  
  16. \node[draw,outer sep=0pt,thick] (M1) [minimum width=1cm, minimum height=1cm] {$m_1$};
  17. \draw[spring] ($(M1.north)$) -- ($(0,4)$)
  18. node [midway,above](m3){};
  19. \fill [pattern = north east lines] (-2,4) rectangle (6,4.2);
  20. \draw [thick,dashed] ($(M1.west) +(-0.2,0)$) --
  21.                            ($(M1.west) + (-1.2,0)$)
  22.                            node [midway, above] (n2){};
  23. \draw [thick,dashed] ($(M1.west) +(-0.2,2)$) --
  24.                            ($(M1.west) + (-1.2,2)$)
  25.                            node [midway, below] (n1) {};
  26.                            
  27. \draw [thick,latex-latex] ($(n1.north)-(0,0.1) $) --
  28.                            ($(n2.south) + (0,0.1)$)
  29.                            node [midway, left] {$\Delta l_1$};                            
  30.                                                    
  31. \draw[thick] (-2,4) -- (6,4);
  32. \draw[ultra thick, -latex] ($(M1.east) +(0.5,0)$) --
  33.                            ($(M1.east) + (0.5,-1.5)$)
  34.                            node [midway, right] {$F_p$};
  35. \draw[ultra thick, -latex] ($(M1.east)+(0.5,0)$) --
  36.                            ($(M1.east) + (0.5,1.5)$)
  37.                            node [midway, right] {$F_{el}$};
  38. \draw[thick, dashed] ($(M1.east)$) -- ($(M1.east) + (0.5,0)$);
  39. \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post
  40. length=0.3cm,segment length=16,amplitude=0.3cm}]
  41. \node[draw,outer sep=0pt,thick] (M2) at (4,-2) [minimum width=1.3cm, minimum height=1.3cm] {$m_2$};
  42. \draw[spring] ($(M2.north)$) -- ($(4,4)$)
  43. node [midway,above](m3){};
  44.   \draw [thick,dashed] ($(M2.west) +(-0.2,0)$) --
  45.                            ($(M2.west) + (-1.2,0)$)
  46.                            node [midway, above](n4) {};
  47.  \draw [thick,dashed] ($(M2.west) +(-0.2,4)$) --
  48.                            ($(M2.west) + (-1.2,4)$)
  49.                            node [midway, below] (n5) {};
  50.  \draw [thick,latex-latex] ($(n5.north)-(0,0.1) $) --
  51.                            ($(n4.south) + (0,0.1)$)
  52.                            node [midway, left] {$\Delta l_2$};
  53.  
  54. \end{tikzpicture}
  55. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement