使用\tkzDefLine[bisector](A,B,C)
中的命令tkz-euclide
,您可以平分一个角。如何将一个角分成三个或更多相等的部分?
答案1
要三等分一个角,请尝试以下方法:
\begin{tikzpicture}[scale=1]
\tkzDefPoint(6,0){A}
\tkzDefPoint(0,1){B}
\tkzDefPoint(1,4){C}
\tkzDrawSegments(A,B B,C)
% Get the angle and define two new points that lie on the trisectors.
\tkzFindAngle(A,B,C) \tkzGetAngle{at}
\tkzDefPointBy[rotation=center B angle 1*\at/3](A) \tkzGetPoint{T1}
\tkzDefPointBy[rotation=center B angle 2*\at/3](A) \tkzGetPoint{T2}
% Draw the trisectors.
\tkzSetUpLine[color=blue!70]
\tkzDrawLine[add=0 and 0](B,T1)
\tkzDrawLine[add=0 and 0](B,T2)
\end{tikzpicture}
生成的图像:
扩展此过程,您可以对一个角度进行 n 分割:只需调整1*\at/3
为从 1 到 n-1k*\at/n
即可。k
答案2
可能有点过头了,但你可以采用莫利定理,使用三线坐标系来构成等边三角形,其顶点可用于描述三分线。不幸的是,从三线坐标系到tkzEuclide
重心坐标系的转换需要一些调整。
\documentclass[tikz,border=5]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\def\tkzfiddle#1{%
\pgfmathparse{#1<0?#1+360:#1}\let#1=\pgfmathresult%
\pgfmathparse{#1>180?180-#1:#1}\let#1=\pgfmathresult%
}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(35:4){B}
\tkzDefPoint(105:4){C}
\tkzFindAngle(B,A,C) \tkzGetAngle{A}
\tkzFindAngle(C,B,A) \tkzGetAngle{B}
\tkzFindAngle(A,C,B) \tkzGetAngle{C}
\tkzCalcLength(A,B) \tkzGetLength{c}
\tkzCalcLength(B,C) \tkzGetLength{a}
\tkzCalcLength(C,A) \tkzGetLength{b}
\tkzfiddle\A\tkzfiddle\B\tkzfiddle\C
\pgfmathparse{max(\a,\b,\c)}\let\n=\pgfmathresult
\pgfmathparse{\a/\n}\let\a=\pgfmathresult
\pgfmathparse{\b/\n}\let\b=\pgfmathresult
\pgfmathparse{\c/\n}\let\c=\pgfmathresult
\tkzDefBarycentricPoint(A=\a*1,B={\b*2*cos(\C/3)},C={\b*2*cos(\B/3)})
\tkzGetPoint{A'}
\tkzDefBarycentricPoint(A={\a*2*cos(\C/3)},B=\b*1,C={\c*2*cos(\A/3)})
\tkzGetPoint{B'}
\tkzDefBarycentricPoint(A={\a*2*cos(\B/3)},B={\b*2*cos(\A/3)},C=\c*1)
\tkzGetPoint{C'}
\tkzDrawPolygon(A,B,C)
\tkzDrawPolygon[red](A,B',C')
\tkzDrawPolygon[green](B,C',A')
\tkzDrawPolygon[blue](C,B',A')
\tkzDrawPoints(A,B,C,A',B',C')
\foreach \label/\anchor in {A/below left, B/right, C/above,
A'/above right, B'/left, C'/below right}%
{\tkzLabelPoints[\anchor](\label)}
\end{tikzpicture}
\end{document}
答案3
tkz-euclide 很有用!但是,我尽量少用它(我懒得记住更多命令)。我从 Lynn 的代码中做了一些改动(见上文)
\documentclass[tikz,border=2mm]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (4,0);
\coordinate (B) at (0,1.5);
\coordinate (C) at (2,5);
\draw (A) node[below]{A}--
(B) node[left]{B}--
(C) node[left]{C};
\tkzFindAngle(A,B,C) \tkzGetAngle{at}
\coordinate (T1) at ($(B)!3cm!\at/3:(A)$);
\coordinate (T2) at ($(B)!3cm!2*\at/3:(A)$);
\draw[blue] (B)--(T1);
\draw[red] (B)--(T2);
\end{tikzpicture}
\end{document}