绘制并标记圆弧以标记角度

绘制并标记圆弧以标记角度

我在 LaTeX 中写了以下内容。我无法绘制和标记所有角度(我想标记 B、C、D 和 F 中的角度。到目前为止,我只设法绘制了 C 中的角度(因为原点更容易)。

% PREAMBLE
% The preamble consists of the parameters for the document, i.e. the margins, the font, the spacing,
% the document type, supplementary packages, etc. Some Latex commands require the use of a
% package defined in the preamble.

\documentclass[a4paper,11pt]{article}
\usepackage[left=2.8cm,top=2.8cm,right=2.8cm,bottom=2.8cm]{geometry}
\usepackage[dutch]{babel}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{geometry}     
\geometry{letterpaper}                          
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{tabularx}
\usepackage{titling}
\usepackage[parfill]{parskip}           
\usepackage{indentfirst}
\usepackage{gensymb}
\usepackage{tocbibind}
\usepackage{tikz}
\usetikzlibrary{babel}
\usetikzlibrary{calc,patterns,intersections,angles,shapes,through,arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri}

正如我的图(我需要标记并引用它)所示,我有:

    \begin{figure}
    \centering
        \begin{tikzpicture}[scale=0.4]      
        %coördinats
        \coordinate[label=above:£A£] (A) at (-6,0); 
        \coordinate[label=left:£B£] (B) at (-10.8844,0); 
        \coordinate (B2) at (-7.8844,0);
        \coordinate (B3) at (-7.4844,0);
        \coordinate[label=120:£C£] (C) at (0,0);
        \coordinate (C2) at (1.8,0);
        \coordinate (C3) at (2.2,0);
        \coordinate[label=below:£D£] (D) at (-61:10cm);
        \coordinate (D2) at (6.84809620246,-8.74619707139);
        \coordinate[label=left:£E£] (E) at (9.69619240493,0);
        \coordinate[label=above:£F£] (F) at (61:10cm);
        \coordinate (F2) at (6.84809620246,8.74619707139);
        %draw angles
        \draw[gray] (B2) arc (0:29.07:3.0);
        \draw[gray] (B3) arc (0:-29.07:3.4);
        \draw[gray] (C2) arc (0:61:1.8);
        \node[] at (30.5:2.5)  {$\phi_{6}$};
        \draw[gray] (C3) arc (0:-61:2.2);
        \node[] at (-30.5:3.15)  {$-\phi_{5}$};
        \draw[gray] (D2) arc (0:61:2);
        \draw[gray] (F2) arc (0:-61:2);
        %draw points
        \foreach \point in {A,B,C,D,E,F}
            \fill [black] (\point) circle (5pt);
        %draw lines
        \draw[blue,very thick] (A) -- (B);
        \draw[black, very thick] (A) -- (C) -- (D) -- (E) -- (F) -- (C);
        \draw[black, very thick] (B) -- (D);
        \draw[black, very thick] (B) -- (F);
        %draw aid lines
        \draw[gray] (C) -- +(3,0);
        \draw[gray] (D) -- +(3,0);
        \draw[gray] (F) -- +(3,0);
        \end{tikzpicture}
        \caption{Mechanism}
        \label{M}
        \vspace{0.8cm}
    \end{figure}

另外,是否可以用箭头画出弧线?非常感谢您的帮助!

答案1

您可以加载

\usetikzlibrary{angles,quotes}

并画出角度。

    \pic [draw,->,red,thick,angle radius=1cm,"$A$"{anchor=west,text =
         black,font=\footnotesize}, angle eccentricity=1] {angle = C--B--F};
    \pic [draw,latex-,blue,thick,angle radius=1cm,"$B$"{anchor=west,text =
         black,font=\footnotesize}, angle eccentricity=1] {angle = D--B--C};
    \pic [draw,-stealth,red,thick,angle radius=1cm,"$\phi_{6}$"{anchor=west,text =
         black,font=\footnotesize}, angle eccentricity=1] {angle = c--C--F};
    \pic [draw,latex-,green,thick,angle radius=1.2cm,"$-\phi_{5}$"{anchor=west,text =
         black,font=\footnotesize}, angle eccentricity=1] {angle = D--C--c};
    \pic [draw,-stealth,red,thick,angle radius=1cm,"$\phi_{7}$"{anchor=west,text =
         black,font=\footnotesize}, angle eccentricity=1] {angle = d--D--E};
    \pic [draw,gray,thick,angle radius=1cm,"$\phi_{10}$"{anchor=west,text =
         black,font=\footnotesize}, angle eccentricity=1] {angle = E--F--f};

完整代码如下:

\documentclass[tikz,border=4]{standalone}
\usetikzlibrary{angles,quotes}
\begin{document}
        \begin{tikzpicture}[scale=0.4]
        %coördinats
        \coordinate[label=above:£A£] (A) at (-10,0);
        \coordinate[label=left:£B£] (B) at (-14.8844,0);
        \coordinate (B2) at (-11.8844,0);
        \coordinate (B3) at (-11.4844,0);
        \coordinate[label=120:£C£] (C) at (0,0);
        \coordinate (C2) at (1.8,0);
        \coordinate (C3) at (2.2,0);
        \coordinate[label=below:£D£] (D) at (-61:10cm);
        \coordinate (D2) at (6.84809620246,-8.74619707139);
        \coordinate[label=left:£E£] (E) at (9.69619240493,0);
        \coordinate[label=above:£F£] (F) at (61:10cm);
        \coordinate (F2) at (6.84809620246,8.74619707139);

        %draw points
        \foreach \point in {A,B,C,D,E,F}
            \fill [black] (\point) circle (5pt);
        %draw lines
        \draw[blue,very thick] (A) -- (B);
        \draw[black, very thick] (A) -- (C) -- (D) -- (E) -- (F) -- (C);
        \draw[black, very thick] (B) -- (D);
        \draw[black, very thick] (B) -- (F);
        %draw aid lines
        \draw[gray] (C) -- +(3,0)coordinate (c);
        \draw[gray] (D) -- +(3,0)coordinate (d);
        \draw[gray] (F) -- +(3,0)coordinate (f);

        \pic [draw,->,red,thick,angle radius=1cm,"$A$"{anchor=west,text =
             black,font=\footnotesize}, angle eccentricity=1] {angle = C--B--F};
        \pic [draw,latex-,blue,thick,angle radius=1cm,"$B$"{anchor=west,text =
             black,font=\footnotesize}, angle eccentricity=1] {angle = D--B--C};
        \pic [draw,-stealth,red,thick,angle radius=1cm,"$\phi_{6}$"{anchor=west,text =
             black,font=\footnotesize}, angle eccentricity=1] {angle = c--C--F};
        \pic [draw,latex-,green,thick,angle radius=1.2cm,"$-\phi_{5}$"{anchor=west,text =
             black,font=\footnotesize}, angle eccentricity=1] {angle = D--C--c};
        \pic [draw,-stealth,red,thick,angle radius=1cm,"$\phi_{7}$"{anchor=west,text =
             black,font=\footnotesize}, angle eccentricity=1] {angle = d--D--E};
        \pic [draw,gray,thick,angle radius=1cm,"$\phi_{10}$"{anchor=west,text =
             black,font=\footnotesize}, angle eccentricity=1] {angle = E--F--f};
        \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容