|
\documentclass[tikz, border=2pt]{standalone}
|
|
\usepackage{amssymb}
|
|
\usetikzlibrary{calc}
|
|
\usetikzlibrary{math}
|
|
\usetikzlibrary{arrows.meta}
|
|
\begin{document}
|
|
\begin{tikzpicture}[line width=1pt]
|
|
\tikzmath{
|
|
\b = 7; \c = 12; \a = sqrt(\b*\b + \c*\c);
|
|
\l = 7;
|
|
\b = \b / \a * \l;
|
|
\c = \c / \a * \l;
|
|
\a = \l;
|
|
\B = asin(\b / \a);
|
|
\C = asin(\c / \a);
|
|
}
|
|
\def\template#1; {
|
|
\coordinate (O) at #1;
|
|
\coordinate (A) at ($(\C:\b)+(O)$);
|
|
\coordinate (B) at ($(\a, 0)+(O)$);
|
|
\coordinate (B1) at ($(0.3*\a, 0)+(O)$);
|
|
\coordinate (A1) at ($(\C:0.7*\b)+(B1)$);
|
|
\draw (O) -- node[below, near start] {$a$} (B) -- node[above right, near end] {$c$} (A) -- node[left] {$b$} cycle;
|
|
\draw (B1) -- node[left] {$b'$} (A1);
|
|
\node[above] () at ($(B1)!0.45!(B)$) {$a'$};
|
|
\node[below] () at ($(A1)!0.3!(B)$) {$c'$};
|
|
\draw[thin] (A) ++(-\B:0.04*\l) -- ++({-90-\B}:0.04*\l) -- ++({180-\B}:0.04*\l);
|
|
\draw[thin] (A1) ++(-\B:0.04*\l) -- ++({-90-\B}:0.04*\l) -- ++({180-\B}:0.04*\l);
|
|
}
|
|
|
|
\template{(0, 4)};
|
|
\template{(0, 0)};
|
|
\coordinate (P) at ($(A1)+(0, -0.7*\b*\c/\a)$);
|
|
\draw[thin] (A1) -- (P);
|
|
\draw[thin] (P) ++(0.04*\l, 0) -- ++(0, 0.04*\l) -- ++(-0.04*\l, 0);
|
|
\draw[thin] (P) -- +(0, -0.05*\l) node[coordinate, near end] (p1) {};
|
|
\draw[thin] (B1) -- +(0, -0.05*\l) node[coordinate, near end] (p2) {};
|
|
\draw[thin] (B) -- +(0, -0.05*\l) node[coordinate, near end] (p3) {};
|
|
\node (x) at ($(p1)!0.5!(p2)$) {$x$};
|
|
\node (y) at ($(p1)!0.5!(p3)$) {$y$};
|
|
\draw[-{Latex[length=2mm]}, thin] (x) -- (p1);
|
|
\draw[-{Latex[length=2mm]}, thin] (x) -- (p2);
|
|
\draw[-{Latex[length=2mm]}, thin] (y) -- (p1);
|
|
\draw[-{Latex[length=2mm]}, thin] (y) -- (p3);
|
|
|
|
\node[below=5mm, align=center] () at ($(O)!0.5!(B)$) {
|
|
$\displaystyle\frac{x}{b}=\displaystyle\frac{b'}{a} \Rightarrow a\cdot x = b\cdot b';$\\
|
|
$\displaystyle\frac{y}{c}=\displaystyle\frac{c'}{a} \Rightarrow a\cdot y = c\cdot c';$\\
|
|
$\therefore\ a\cdot a'=a\cdot(x+y)=b\cdot b'+c\cdot c'.$
|
|
};
|
|
\end{tikzpicture}
|
|
|
|
\end{document}
|
评论
Comments powered by Disqus