绘制 Tikz 三角形(对我来说很复杂)

绘制 Tikz 三角形(对我来说很复杂)

我在这里遇到了困难。我试图让这个三角形看起来像我在纸上画的那个。但是我不确定如何实现缺失的线条和角度?

\begin{tikzpicture}[scale=1.25]%,cap=round,>=latex]

\coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
\coordinate [label=right:$B$] (C) at (1.5cm,-1.0cm);
\coordinate [label=above:$C$] (B) at (1.5cm,1.0cm);
\draw (A) -- node[sloped,above] {b} (B) -- node[right] {a = Rundetårn} (C) -- node[below] {$c=\num{20}$} (A);

\draw (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);
\tkzMarkAngle[fill= gray,size=0.8cm,opacity=.2](C,A,B)
\tkzLabelAngle[pos = 0.6](C,A,B){$61^0$}

\end{tikzpicture}

在此处输入图片描述

答案1

以下是如何借助计算图书馆和图片机制(因此角度引号库):

代码

\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{calc, angles, quotes}

\begin{document}

\begin{tikzpicture}
    % Define A, B and C
    \draw (0,0) coordinate (A) -- ++ (8,0) coordinate(B) -- ++ (0,6) coordinate (C) -- cycle;

    % go to the point 40% on the way from C to A, name it D; from there go to the intersection from a horizontal line through A and a vertical line through D, call it E
    \draw[dashed] ($(C)!0.4!(A)$) coordinate (D) -- (A -| D) coordinate (E);

    % connect E and C
    \draw (E) -- (C);

    % draw the angle at A; point are specified in negative direction (clockwise)
    \path pic [draw, "$46^{\circ}$", angle radius=1.2cm] {angle=B--A--C};

    % draw the angle at E
    \path pic [draw, "$54^{\circ}$", angle radius=1.2cm] {angle=B--E--C};

\end{tikzpicture}

\end{document}

输出

在此处输入图片描述

相关内容