尺子圆规工具是否可以在不画圆圈的情况下标记交叉点?

尺子圆规工具是否可以在不画圆圈的情况下标记交叉点?

我试图在两点之间画一条垂直平分线,这样我就可以指定任意两点(这里标记为 A 和 B),其余的图表就跟在它后面。我不知道用 Tikz 画垂直平分线的其他方法,所以我使用了 Rulercompass 包来以几何方式构造它。但是,我不希望圆包含在最终的图表中:只包含它们构造的交点(这里是 C)。

有没有办法使用标尺指南针工具来找到这个交点,而无需实际绘制圆圈(类似于命令的工作方式\path)?我尝试过更改指南针样式,但我不知道正确的语法。

或者,是否有其他方法可以仅用两个点来指定垂直平分线?

谢谢!(如果我的代码有点混乱,请见谅)

\documentclass{exam}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
    \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations,decorations.markings,through,rulercompass}

\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}
%list points and coordinates
\coordinate (vertex1) at (0,0);
\coordinate (vertex2) at (3,1);
\draw (vertex1) -- (vertex2);
\compass{vertex1}{vertex2};
\compass{vertex2}{vertex1};
\point{c{vertex1}{vertex2}}{c{vertex2}{vertex1}}{1};
\point{c{vertex1}{vertex2}}{c{vertex2}{vertex1}}{2};
\ruler{a}{b};
\draw (a)--(vertex1);
\draw (a)--(vertex2);
\draw (a)--($(vertex1)!0.5!(vertex2)$);
\node[left] at (vertex1){$A$};
\node[right] at (vertex2){$B$};
\node[below] at ($(vertex1)!0.5!(vertex2)$){$C$};
\node[above] at (a){$D$};

\end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

这是一种仅使用的方法tkz-euclide,您已经在使用了:

\documentclass[11pt]{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(3,1){B}
\tkzDefCircle[radius](B,A)
\tkzDefCircle[radius](A,B)
\tkzInterCC(B,A)(A,B)\tkzGetPoints{M}{N}
\tkzDrawSegment(A,B)
\tkzDrawSegment[color=orange](M,N)
\tkzDefMidPoint(A,B) \tkzGetPoint{C}
\tkzDrawPoint[size=15](C)
\tkzDrawPoints[size=10](A,B)
\tkzLabelPoint[right,blue](B){$B$}
\tkzLabelPoint[left,blue](A){$A$}
\tkzLabelPoint[below right,red](C){$C$}
\end{tikzpicture}
\end{document}

tkz-euclide包允许您定义线条、圆圈等,而无需实际绘制它们。它还具有用于获取两个圆、两条线或一个圆和一条线的交点的宏。在 Gummi 中运行的代码如下所示: 在此处输入图片描述

正如我所提到的,\tkzDefCircle[radius](B,A) 定义以 B 为中心、以 A 为半径的圆。\tkzInterCC(B,A)(A,B)\tkzGetPoints{M}{N} 计算两个圆的交点并将它们称为 M 和 N。

答案2

使用\tkzDefMidPoint\tkzDefLine来自tkz-euclide包裹

\documentclass{exam}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
    \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations,decorations.markings,through,rulercompass}

\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}
%list points and coordinates
\coordinate (A) at (0,0);
\coordinate (B) at (3,1);
\tkzDefMidPoint(A,B) \tkzGetPoint{C}
\tkzDefLine[mediator](A,B)\tkzGetPoints{D}{E}
\draw (A) -- (B);
\draw (D)--(E);
\node[left] at (A){$A$};
\node[right] at (B){$B$};
\node[draw ,cross out,label=above right:$C$] at(C) {};



\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容