%% mechanics-pulley-two-masses.tex
%% A fixed pulley with two freely hanging masses (Atwood arrangement).

\documentclass[tikz,border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{tikzphysics}

\begin{document}
\begin{tikzpicture}
  \node[ceiling, ceiling width=3.2, ceiling depth=0.3]
    (C) at (0,0) {};
  \draw (C.surface) -- ++(0,-0.5) coordinate (mount);
  %% No size override: this is the default 1cm pulley.
  \node[pulley] (P) at (mount) {};

  \node[block, minimum width=8mm, minimum height=1cm]
    (L) at ($(P.west)+(0,-2.2)$) {$m_1$};
  \node[block, minimum width=8mm, minimum height=1cm]
    (R) at ($(P.east)+(0,-2.8)$) {$m_2$};

  \physicsstringoverpulley[string route=over]{L.north}{P}{R.north}
\end{tikzpicture}
\end{document}
