The Pythagorean Theorem V

|
\documentclass[tikz, border=2pt]{standalone}
|
|
\usetikzlibrary{calc}
|
|
\usetikzlibrary{math}
|
|
\begin{document}
|
|
\begin{tikzpicture}[line width=1pt]
|
|
\tikzmath{
|
|
\a = 5; \b = 12; \c = sqrt(\a*\a + \b*\b);
|
|
\A = acos(\b / \c);
|
|
\B = acos(\a / \c);
|
|
\l = 5;
|
|
\a = \a / \c * \l;
|
|
\b = \b / \c * \l;
|
|
\c = \l;
|
|
}
|
|
\coordinate (O) at (0, 0);
|
|
\coordinate (A) at (0, \a);
|
|
\coordinate (B) at (\b, 0);
|
|
\coordinate (C) at (\a, \a+\b);
|
|
\coordinate (D) at (0, \a+\b);
|
|
\draw[rounded corners=0.01mm] (O) -- node[left] {$a$} (A) -- node[above] {$c$} (B) -- node[below] {$b$} cycle;
|
|
\draw[rounded corners=0.01mm] (A) -- node[right] {$c$} (C) -- node[above] {$a$} (D) -- node[left] {$b$} cycle;
|
|
\draw (O) -- (B) -- (C) -- (D) -- cycle;
|
|
\draw (B) -- node[right, align=center, very near end] {$A=2\cdot\displaystyle\frac{1}{2}ab+\displaystyle\frac{1}{2}c^2=\displaystyle\frac{1}{2}(a+b)^2$\\ \\ $c^2=a^2+b^2$} (C);
|
|
\draw[thin] (0.05*\l, 0) -- ++(0, 0.05*\l) -- ++(-0.05*\l, 0);
|
|
\draw[thin] (D) ++(0.05*\l, 0) -- ++(0, -0.05*\l) -- ++(-0.05*\l, 0);
|
|
\draw[thin] (A) ++(-\A:0.05*\l) -- ++(\B:0.05*\l) -- ++({180-\A}:0.05*\l);
|
|
\end{tikzpicture}
|
|
\end{document}
|
评论
Comments powered by Disqus