绘制滑轮系统

绘制滑轮系统

考虑:

在此处输入图片描述

我需要绘制如图所示的滑轮系统。我该怎么做?

\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

为了计算切线,最好将圆设为节点并使用tangent cs:,这是 附带的calc。可以使用 库方便地绘制角度angles,其中quotes使得添加\alpha和变得稍微简单一些\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}

在此处输入图片描述

相关内容