在直角三角形上做直角标记?

在直角三角形上做直角标记?

如何在 B 处添加“直角符号”?

\documentclass[12pt]{book} 
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
 % Draw the triangle
        \draw[fill=gray!10]  (1, 0) coordinate (A) 
        -- node[left] {} (0,2) coordinate (C) 
        -- node[above right] {} (6,2) coordinate (B) 
        -- node[below] {}  (1, 0);
         %The right-angle mark at C is drawn.

% Draw nodes
        \node at (A)[anchor=north] {$B$};
        \node at (B)[anchor=north] {$C$};
        \node at (C)[anchor=south] {$A$};
      \end{tikzpicture}

\end{document}

答案1

这是我根据答案做的这里

\documentclass[12pt]{book} 
\usepackage{tikz}
\newcommand*{\rechterWinkel}[3]{% #1 = point, #2 = start angle, #3 = radius
    \draw[shift={(#2:#3)}] (#1) arc[start angle=#2, delta angle=90, radius = #3];
    \fill[shift={(#2+45:#3/2)}] (#1) circle[radius=1.25\pgflinewidth];
}
\begin{document}
\begin{tikzpicture}
 % Draw the triangle
        \draw[fill=gray!10]  (1, 0) coordinate (A) 
        -- node[left] {} (0,2) coordinate (C) 
        -- node[above right] {} (6,2) coordinate (B) 
        -- node[below] {}  (1, 0);
         %The right-angle mark at C is drawn.

% Draw nodes
        \node at (A)[anchor=north] {$B$};
        \node at (B)[anchor=north] {$C$};
        \node at (C)[anchor=south] {$A$};
        
    \rechterWinkel{0.85,0.04}{15}{.5}
      \end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容