![tkz-euclide 中关于两条线相交的一个奇怪问题](https://linux22.com/image/459609/tkz-euclide%20%E4%B8%AD%E5%85%B3%E4%BA%8E%E4%B8%A4%E6%9D%A1%E7%BA%BF%E7%9B%B8%E4%BA%A4%E7%9A%84%E4%B8%80%E4%B8%AA%E5%A5%87%E6%80%AA%E9%97%AE%E9%A2%98.png)
我正在实现以下代码(基于 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}