5

Consider:

Enter image description here

I need to draw a pulley system as in the figure. How can I do that?

\begin{tikzpicture}
    \fill[pattern=north east lines] (-3,0) rectangle (3,.3);
    \draw(-3,0)--(3,0);
    \draw(-2.5,0)--(-2.5,-2.4);
    \draw(2.5,0)--(2.5,-1);

    \draw[fill=white] (-2.5,-2.4) circle (.3);
    \draw[fill=white] (2.5,-1) circle (.3);
    \draw[fill=white] (0,-3) circle (.153);

    \draw
    (2.5,-1) coordinate (a) node[right] {}
    -- (0,-3) coordinate (b) node[left] {}
    -- (0,-2.75) coordinate (c) node[above right] {}
    pic["$\beta$", draw=orange, <->, angle eccentricity=1.2172, angle radius=.51cm]
    {angle=a--b--c};

    \draw
    (0,-2.75) coordinate (a) node[right] {}
    -- (0,-3) coordinate (b) node[left] {}
    -- (-2.5,-2.4) coordinate (c) node[above right] {}
    pic["$\alpha$", draw=orange, <->, angle eccentricity=.72172, angle radius=.751cm]
    {angle=a--b--c};
    \draw[dashed] (0,-3)--(0,-1);
    \draw[fill=white] (-2.5,-2.4) circle (.3);
    \draw[fill=white] (2.5,-1) circle (.3);

    \draw[fill=white] (0,-3) circle (.153);

\end{tikzpicture}

1 Answer 1

12

In order to compute the tangents it is advantageous to make the circles nodes and to use tangent cs:, which comes with calc. And the angles can be conveniently drawn with the angles library, where quotes makes it somewhat simpler to add \alpha and \beta.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{patterns,calc,angles,quotes}
\begin{document}
\begin{tikzpicture}
\fill[pattern=north east lines] (-3,0) rectangle (3,.3);
 \begin{scope}[thick]
 \draw(-3,0)--(3,0);

 \path (-2.5,-2.4) node[circle,draw,inner sep=.3cm] (L){}
 (2.5,-1) node[circle,draw,inner sep=.3cm] (R){}
 (0,-3) node[circle,draw,inner sep=.153cm,label=below:$m$] (M){};
 \draw (L.north) -- (L.north|-0,0) (R.north) -- (R.north|-0,0);
 \draw[dashed] (M) -- (0,-1)coordinate (M1);
  \draw (M)  -- (tangent cs:node=L,point={(M.center)},solution=1) coordinate (L1)
  let \p1=($(L1)-(L.center)$),\n1={atan2(\y1,\x1)},\n2={veclen(\y1,\x1)} in
  arc(\n1:180:\n2) -- ++(0,-1.5) node[below,draw]{$m_1$};
  \draw (M)  -- (tangent cs:node=R,point={(M.center)},solution=2) coordinate (R1)
  let \p1=($(R1)-(R.center)$),\n1={atan2(\y1,\x1)},\n2={veclen(\y1,\x1)} in
  arc(\n1:00:\n2) -- ++(0,-1.5) node[below,draw]{$m_2$};
 \end{scope}
 \path pic [draw,angle radius=0.5cm,"$\alpha$",angle eccentricity=1.5] {angle = M1--M--L1} 
   pic [draw,angle radius=0.7cm,"$\beta$",angle eccentricity=1.5] {angle = R1--M--M1} ;
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.