% ---------------------------------------------------------------
% Sistema mecânico massa-mola-amortecedor (exemplo de modelagem).
% Requer \usetikzlibrary{decorations.pathmorphing} no chunk .qmd.
% ---------------------------------------------------------------
\begin{tikzpicture}[>=Latex, line width=0.9pt]

  % parede
  \draw (0,-1.0) -- (0,1.6);
  \foreach \y in {-0.9,-0.6,...,1.5}
    \draw (0,\y) -- (-0.25,\y-0.25);

  % mola
  \draw[decorate, decoration={coil, aspect=0.4, segment length=4pt, amplitude=3pt}]
    (0,0.9) -- (2.2,0.9);
  \node[font=\small] at (1.1,1.25) {$k$};

  % amortecedor
  \draw (0,0.0) -- (0.9,0.0);
  \draw (0.9,-0.35) rectangle (1.7,0.35);
  \draw (1.1,0.0) -- (2.2,0.0);
  \node[font=\small] at (1.3,-0.6) {$b$};

  % massa
  \draw[fill=blue!8] (2.2,-0.55) rectangle (3.6,1.25);
  \node at (2.9,0.35) {$m$};

  % força e deslocamento
  \draw[->] (3.6,0.35) -- (4.6,0.35) node[right] {$F(t)$};
  \draw[->, dashed] (2.9,-1.0) -- (2.9,-1.9) node[below]{};
  \draw[->] (2.9,-1.3) -- (4.3,-1.3) node[right, font=\small] {$x(t)$};

  \node[font=\small] at (2.9,1.6) {atrito viscoso $b$, rigidez $k$};

\end{tikzpicture}
