我尝试查看该问题的过去的答案但似乎无法解决我的问题。
我想标记这个三角形中的角度 ABD 和 DBC:
\documentclass{article}
\usepackage{tikz,amsmath,amssymb,tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmin=-0.5,xmax=6.7,ymin=-0.7,ymax=3.5]
\tkzClip[space=0.25]
\coordinate (A) at (0,0); \tkzLabelPoints[left](A)
\coordinate (B) at (2.25,3.320718914); \tkzLabelPoints[above](B)
\coordinate (C) at (6,0); \tkzLabelPoints[right](C)
\coordinate (E) at (3,0); \tkzLabelPoints[below](E)
\draw (A)--(B)--(C)--cycle;
\draw (B)--(E);
\tkzDefLine[bisector](A,B,C)\tkzGetPoint{a}
\tkzInterLL(A,C)(B,a) \tkzGetPoint{D} \tkzLabelPoints[below](D)
\draw (B)--(D);
\tkzDefMidPoint(A,B) \tkzGetPoint{12}
\tkzLabelPoints[left](12)
\tkzDefMidPoint(B,C) \tkzGetPoint{15}
\tkzLabelPoints[right=0.1cm](15)
\tkzDefMidPoint(A,C) \tkzGetPoint{18}
\tkzLabelPoints[below=0.4cm](18)
\tkzMarkSegment[mark=|](A,E)
\tkzMarkSegment[mark=|](C,E)
\tkzLabelSegment(A,B)
\tkzLabelSegment(B,C)
\tkzLabelSegment(C,A)
\end{tikzpicture}
\end{document}
答案1
您可以angles
为此使用库。
\documentclass{article}
\usepackage{tikz,amsmath,amssymb,tkz-euclide}
\usetikzlibrary{angles}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmin=-0.5,xmax=6.7,ymin=-0.7,ymax=3.5]
\tkzClip[space=0.25]
\coordinate (A) at (0,0); \tkzLabelPoints[left](A)
\coordinate (B) at (2.25,3.320718914); \tkzLabelPoints[above](B)
\coordinate (C) at (6,0); \tkzLabelPoints[right](C)
\coordinate (E) at (3,0); \tkzLabelPoints[below](E)
\draw (A)--(B)--(C)--cycle;
\draw (B)--(E);
\tkzDefLine[bisector](A,B,C)\tkzGetPoint{a}
\tkzInterLL(A,C)(B,a) \tkzGetPoint{D} \tkzLabelPoints[below](D)
\draw (B)--(D);
\tkzDefMidPoint(A,B) \tkzGetPoint{12}
\tkzLabelPoints[left](12)
\tkzDefMidPoint(B,C) \tkzGetPoint{15}
\tkzLabelPoints[right=0.1cm](15)
\tkzDefMidPoint(A,C) \tkzGetPoint{18}
\tkzLabelPoints[below=0.4cm](18)
\tkzMarkSegment[mark=|](A,E)
\tkzMarkSegment[mark=|](C,E)
% \tkzLabelSegment(A,B)
% \tkzLabelSegment(B,C)
% \tkzLabelSegment(C,A)
\draw pic[draw=blue, angle radius=5mm] {angle = A--B--D};
\draw pic[draw=red, angle radius=7mm] {angle = D--B--C};
\end{tikzpicture}
\end{document}
答案2
您可以使用\tkzFindAngle
、、tkzGetAngle
和tkzMarkAngle
。tkzLabelAngle
顺便说一下,
\tkzDefMidPoint(A,B) \tkzGetPoint{12}
\tkzLabelPoints[left](12)
并且做
\tkzLabelSegment[left](A,B){12}
是相同的(至少在这种情况下)。但正如您所见,命令要短得多。如果我是你,我会使用它。我已经从您的代码中更正了它,因为\tkzLabelSegment(A,B)
缺少花括号之间的名称。
输出
代码
\documentclass[margin=10pt]{standalone}
\usepackage{tikz,amsmath,amssymb,tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmin=-0.5,xmax=6.7,ymin=-0.7,ymax=3.5]
\tkzClip[space=0.25]
\coordinate (A) at (0,0); \tkzLabelPoints[left](A)
\coordinate (B) at (2.25,3.320718914); \tkzLabelPoints[above](B)
\coordinate (C) at (6,0); \tkzLabelPoints[right](C)
\coordinate (E) at (3,0); \tkzLabelPoints[below](E)
\draw (A)--(B)--(C)--cycle;
\draw (B)--(E);
\tkzDefLine[bisector](A,B,C)\tkzGetPoint{a}
\tkzInterLL(A,C)(B,a) \tkzGetPoint{D} \tkzLabelPoints[below](D)
\draw (B)--(D);
\tkzDefMidPoint(A,B) \tkzGetPoint{12}
\tkzLabelPoints[left](12)
\tkzDefMidPoint(B,C) \tkzGetPoint{15}
\tkzLabelPoints[right=0.1cm](15)
\tkzDefMidPoint(A,C) \tkzGetPoint{18}
\tkzLabelPoints[below=0.4cm](18)
\tkzMarkSegment[mark=|](A,E)
\tkzMarkSegment[mark=|](C,E)
\tkzFindAngle(A,B,D)
\tkzFindAngle(D,B,C)
\tkzGetAngle{angleABD}; \FPround\angleABD\angleABD{0}
\tkzGetAngle{angleDBC}; \FPround\angleDBC\angleDBC{0}
\tkzMarkAngle[draw=black,opacity=.5,fill=green!10](A,B,D)
\tkzMarkAngle[draw=black,opacity=.5,fill=red!10](D,B,C)
\tkzLabelAngle[dist=1.2](A,B,D){\tiny $\angleABD^\circ$}
\tkzLabelAngle[dist=1.2](D,B,C){\tiny $\angleDBC^\circ$}
%\tkzLabelSegment[left](A,B){AB}
%\tkzLabelSegment[right](B,C){BC}
%\tkzLabelSegment[below](C,A){CA}
\end{tikzpicture}
\end{document}