画一个以线段为直径的半圆

画一个以线段为直径的半圆

我正在尝试绘制 ATM 机的简单示意图,但我无法表示柜台。柜台的示意图是一个带有线段的半圆形。它们的位置在最右边和底部(我设法只画出了线段)。

这是我的代码:

\documentclass{scrbook} 

\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}

\usepackage{amsfonts, amsthm, amsmath, braket}
\usepackage{tikz}
\usetikzlibrary{angles, quotes,calc,patterns}


\begin{document}

    \begin{tikzpicture}

        \draw[thick] (0,0) rectangle (1.5, 0.5);

        %== CUBO
        \draw[thick] (1.5, 0.25) -- (3,0.25);
        \draw[thick] (3,0.25) -- (3, -0.25) -- (4, -0.25) -- (4, 0.75) -- (3, 0.75) -- (3, 0.25);
        \draw[thick] (3, 0.75) -- (3.3, 0.95);
        \draw[thick] (4, 0.75) -- (4.3, 0.95);
        \draw[thick] (3.3, 0.95) -- (4.3, 0.95);
        \draw[thick] (4, -0.25) -- (4.3, -0.05);
        \draw[thick] (4.3, 0.95) -- (4.3, -0.05);

        \draw[dashed] (5.5,0.21) -- (4, 0.21); 
        \draw[dashed] (5.5,0.29) -- (4, 0.29); 
        \draw[thick] (4.3, 0.21) -- (5.5,0.21);
        \draw[thick] (4.3, 0.29) -- (5.5,0.29);

        \draw[thick] (5.5,0.29) -- (5.5, -0.25) -- (5.8, -0.05) -- (5.8, 0.95);
        \draw[thick] (5.5,0.29) -- (5.5, 0.75) -- (5.8, 0.95);

        \draw[dashed] (5.5, 0.21) -- (5.8, 0.21);       
        \draw[dashed] (5.5, 0.29) -- (5.8, 0.29);

        \draw[thick] (6.5, 0.29) -- (6.5, -0.25);
        \draw[thick, ->] (6.5, 0.29) -- (6.5, 0.95);

        \draw[thick] (5.8, 0.21) -- (7.5, 0.21);
        \draw[thick] (5.8, 0.29) -- (7.5, 0.29);

        \draw[thick] (7.5, 0.25) -- (7.5, -0.25) -- (8.5,-0.25) -- (8.5, 0.75) -- (7.5, 0.75) -- (7.5, 0.25);
        \draw[thick] (7.5, 0.75) -- (8.5,-0.25);

        \draw[dashed] (7.5, 0.21) -- (8, 0.21) -- (8, -0.22);
        %P_\theta
        \draw[thick] (8, -0.22) -- (8, -1.5);
        \draw[thick] (8, -1.5) -- (7.5, -1.5) -- (7.5, -2.5) -- (8.5, -2.5) -- (8.5, -1.5) -- (7.5, -1.5);

        \draw[thick] (8, -2.5) -- (8, -3.5);
        \draw[thick] (8, -3.5) -- (7.5, -3.5);
        \draw[thick] (8, -3.5) -- (8.5, -3.5);

        %P_\varphi
        \draw[thick] (7.5, 0.29) -- (10, 0.29);
        \draw[thick] (10, 0.29) -- (10, -0.25) -- (11, -0.25) -- (11, 0.75) -- (10, 0.75) -- (10, 0.29);

        \draw[thick] (11, 0.29) -- (12.5, 0.29);
        \draw[thick] (12.5, 0.29) -- (12.5, -0.3);
        \draw[thick] (12.5, 0.29) -- (12.5, 0.8);
        %\draw (12.5, 0.8) arc (-90:180:1);


    \end{tikzpicture}

\end{document}

答案1

我不知道你到底想要什么,但这里有一个建议:

(代码可以简化,但这不是必需的,因为这只是一个快速的答案。)

\documentclass{scrbook} 

\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}

\usepackage{amsfonts, amsthm, amsmath, braket}
\usepackage{tikz}
\usetikzlibrary{angles, quotes,calc,patterns}


\begin{document}

    \begin{tikzpicture}

        \draw[thick] (0,0) rectangle (1.5, 0.5);

        %== CUBO
        \draw[thick] (1.5, 0.25) -- (3,0.25);
        \draw[thick] (3,0.25) -- (3, -0.25) -- (4, -0.25) -- (4, 0.75) -- (3, 0.75) -- (3, 0.25);
        \draw[thick] (3, 0.75) -- (3.3, 0.95);
        \draw[thick] (4, 0.75) -- (4.3, 0.95);
        \draw[thick] (3.3, 0.95) -- (4.3, 0.95);
        \draw[thick] (4, -0.25) -- (4.3, -0.05);
        \draw[thick] (4.3, 0.95) -- (4.3, -0.05);

        \draw[dashed] (5.5,0.21) -- (4, 0.21); 
        \draw[dashed] (5.5,0.29) -- (4, 0.29); 
        \draw[thick] (4.3, 0.21) -- (5.5,0.21);
        \draw[thick] (4.3, 0.29) -- (5.5,0.29);

        \draw[thick] (5.5,0.29) -- (5.5, -0.25) -- (5.8, -0.05) -- (5.8, 0.95);
        \draw[thick] (5.5,0.29) -- (5.5, 0.75) -- (5.8, 0.95);

        \draw[dashed] (5.5, 0.21) -- (5.8, 0.21);       
        \draw[dashed] (5.5, 0.29) -- (5.8, 0.29);

        \draw[thick] (6.5, 0.29) -- (6.5, -0.25);
        \draw[thick, ->] (6.5, 0.29) -- (6.5, 0.95);

        \draw[thick] (5.8, 0.21) -- (7.5, 0.21);
        \draw[thick] (5.8, 0.29) -- (7.5, 0.29);

        \draw[thick] (7.5, 0.25) -- (7.5, -0.25) -- (8.5,-0.25) -- (8.5, 0.75) -- (7.5, 0.75) -- (7.5, 0.25);
        \draw[thick] (7.5, 0.75) -- (8.5,-0.25);

        \draw[dashed] (7.5, 0.21) -- (8, 0.21) -- (8, -0.22);
        %P_\theta
        \draw[thick] (8, -0.22) -- (8, -1.5);
        \draw[thick] (8, -1.5) -- (7.5, -1.5) -- (7.5, -2.5) -- (8.5, -2.5) -- (8.5, -1.5) -- (7.5, -1.5);

        \draw[thick] (8, -2.5) -- (8, -3.5);
        \draw[thick] (8, -3.5) -- (7.5, -3.5);
        \draw[thick] (8, -3.5) -- (8.5, -3.5);

        %P_\varphi
        \draw[thick] (7.5, 0.29) -- (10, 0.29);
        \draw[thick] (10, 0.29) -- (10, -0.25) -- (11, -0.25) -- (11, 0.75) -- (10, 0.75) -- (10, 0.29);

        \draw[thick] (11, 0.29) -- (12.5, 0.29);
        \draw[thick] (12.5, 0.29) -- (12.5, -0.3);
        \draw[thick] (12.5, 0.29) -- (12.5, 0.8);
        \draw (12.5, -.3) arc (-90:90:.55);


    \end{tikzpicture}

\end{document}

输出如下:

截屏

相关内容