组合直角三角形

组合直角三角形

在此处输入图片描述

这个怎么画?我只能画三角形 AED。

答案1

我用普通的 Ti 画这个Z,但也许tkz-euclide正如 SebGlav 在评论中所说,是一个更好的选择。

首次使用 TiZ 计算所有距离和角度,然后coordinate借助calc库设置 s 并绘制三角形。最后,我绘制角度,显然是借助angles库。

顺便说一句,我假设 B 中的三个角相等。

\documentclass[border=6mm]{standalone}
\usepackage    {siunitx} % for \ang
\usepackage    {tikz}
\usetikzlibrary{angles}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,scale=2]
% distances and angles
\def\CD{1}   % CD distance
\def\CG{0.5} % CG distance
\def\DE{1}   % DE distance
\def\aC{35}  % angle C
\def\aE{53}  % angle E
\pgfmathsetmacro\AD{\DE*tan(\aE)}     % AD distance
\pgfmathsetmacro\AC{\AD+\CD}          % AC distance
\pgfmathsetmacro\AB{\AC*tan(\aC)}     % AB distance
\pgfmathsetmacro\BG{\AC/cos(\aC)-\CG} % BG distance
\pgfmathsetmacro\aB{90-\aC}           % angle B (assuming the three angles are equal)
\pgfmathsetmacro\BF{\BG*cos(\aB)}     % BF distance   
% coordinates
\coordinate (E) at (0,0);
\coordinate (D) at (\DE,0);
\coordinate (A) at (\DE,\AD);
\coordinate (C) at (\DE,-\CD);
\coordinate (B) at ($(A)+(\AB,0)$);
\coordinate (G) at ($(C)!\CG cm!(B)$);
\coordinate (F) at ($(B)+(2*\aB-180:\BF)$);
\coordinate (H) at ($2*(F)-(G)$);
% triangles
\draw (A) node [above] {$A$} -- (D) node [below left] {$D$} -- (E) node [below left] {$E$} -- cycle;
\draw (A) -- (B) node [above] {$B$} -- (C) node [below] {$C$}  -- cycle;
\draw (B) -- (F) node [below] {$F$} -- (G) node [below right] {$G$} -- cycle;
\draw (B) -- (F)  -- (H) node [right] {$H$} -- cycle;
% angles, with angles library
\draw[blue] pic [draw] {angle=D--E--A} node [above,xshift=0.8cm] at (E) {\ang{\aE}};
\draw[blue] pic [draw] {angle=B--C--A} node [right,yshift=1cm]   at (C) {\ang{\aC}};
\draw[red]  pic [draw] {angle=A--B--C};
\draw[red]  pic [draw,angle radius=0.7cm] {angle=C--B--F};
\draw[red]  pic [draw] {angle=F--B--H};
\draw[red]  pic [draw,angle radius=3mm] {right angle=E--D--A};
\draw[red]  pic [draw,angle radius=3mm] {right angle=G--F--B};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容