我正在实现以下代码(基于 tkz-euclide)来生成图形。当我定义并绘制点时,奇怪的事情发生了埃。埃是(定义为)线的交点AB和线光盘。然而,它总是显示为线的交叉点光盘和圆圈办公自动化(如下所示)。我仔细检查了语法,我觉得没问题。因此,我不知道错误在哪里。任何帮助都非常感谢!
\documentclass[dvipsnames]{article}
\usepackage{tkz-euclide,tikz}
\begin{document}
\begin{tikzpicture}[scale=0.5]
\tkzDefPoints{0/0/A,8/0/B,6/5/C}
\tkzDrawPoints(A,B,C)
\tkzLabelPoints[above right](C)
\tkzLabelPoints[below left](A)
\tkzLabelPoints[below right](B)
\tkzDrawPolygon[thick](A,B,C)
\tkzDefCircle[circum](A,B,C)
\tkzGetPoint{O}
\tkzDrawCircle[thick, color=black](O,A)
\tkzDefPointBy[rotation in rad= center C angle pi/10](A)
\tkzGetPoint{Y}
\tkzInterLC(C,Y)(O,A)
\tkzGetPoints{Z}{D}
\tkzDrawSegment[thick, black](C,D)
\tkzDrawPoints(D)
\tkzLabelPoints[below left](D)
\tkzInterLL(C,D)(A,B)
\tkzGetPoints(E)
\tkzDrawPoints(E)
\tkzLabelPoints(E)
\end{tikzpicture}
\end{document}
答案1
你不需要tikz
在加载时加载tkz-euclide
,因为它从最后一个开始就需要。这是解决方案,你必须将\tkzGetPoint{E}
宏中的括号替换为花括号:
\documentclass[dvipsnames]{article}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}[scale=0.5]
\tkzDefPoints{0/0/A,8/0/B,6/5/C}
\tkzDrawPoints(A,B,C)
\tkzLabelPoints[above right](C)
\tkzLabelPoints[below left](A)
\tkzLabelPoints[below right](B)
\tkzDrawPolygon[thick](A,B,C)
\tkzDefCircle[circum](A,B,C)
\tkzGetPoint{O}
\tkzDrawCircle[thick, color=black](O,A)
\tkzDefPointBy[rotation in rad= center C angle pi/10](A)
\tkzGetPoint{Y}
\tkzInterLC(C,Y)(O,A)
\tkzGetPoints{Z}{D}
\tkzDrawSegment[thick, black](C,D)
\tkzDrawPoints(D)
\tkzLabelPoints[below left](D)
\tkzInterLL(C,D)(A,B)
\tkzGetPoint{E}
\tkzDrawPoints(E)
\tkzLabelPoints(E)
\end{tikzpicture}
\end{document}
答案2
我\tkzDrawPoints(A,...,E)
更喜欢这种呈现方式。我们可以注意到\tkzLabelPoints[below left](A,D,E)
\documentclass[dvipsnames]{article}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}[scale=0.5]
% fixed points
\tkzDefPoints{0/0/A,8/0/B,6/5/C}
% calculated points
\tkzDefCircle[circum](A,B,C)
\tkzGetPoint{O}
\tkzDefPointBy[rotation in rad= center C angle pi/10](A)
\tkzGetPoint{Y}
\tkzInterLC(C,Y)(O,A)
\tkzGetPoints{Z}{D}
\tkzInterLL(C,D)(A,B)
\tkzGetPoint{E}
% drawings
\tkzDrawCircle[thick, color=black](O,A)
\tkzDrawPolygon[thick](A,B,C)
\tkzDrawSegment[thick, black](C,D)
\tkzDrawPoints(A,...,E)
% labels
\tkzLabelPoints[below left](A,D,E)
\tkzLabelPoints[below right](B)
\tkzLabelPoints[above right](C)
\end{tikzpicture}
\end{document}