线与圆的交点

线与圆的交点

我想动态定义点 X。现在我已经在 -90° 处定义了点,但我想让它根据 O 的位置​​而变化。(我知道有类似的问题,但我找不到我的问题的答案。)

在此处输入图片描述

 \documentclass{article}
 \usepackage{pgfplots}
 \usepackage{tkz-euclide}
 \usetkzobj{all}
 \begin{document}
 \begin{center}
\begin{tikzpicture}
\coordinate (M) at (0,0) ;
\coordinate (O) at (canvas polar cs:angle=90,radius=3cm) ;
\coordinate (A) at (canvas polar cs:angle=-130,radius=3cm);
\coordinate (B) at (canvas polar cs:angle=-30,radius=3cm) ;
\coordinate (X) at (canvas polar cs:angle=-90,radius=3cm);
\draw (M) circle (3cm);
\draw (A) -- (M) -- (B);
\draw (A) -- (O) -- (B);
\tkzDrawLine[dashed, add= 0.2 and 1.3,color=black](O,M)
\tkzDrawPoints(O,A,B,M,X);
\tkzLabelPoints[left](A,M);
\tkzLabelPoints[below right](X);
\tkzLabelPoints[above left](O);
\tkzLabelPoints(B);
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](A,M,B);
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](A,O,B);
\tkzLabelAngle[pos = 1.2](A,O,M){$2$};  
\tkzLabelAngle[pos = 1.2](M,O,B){$1$}; 
\tkzLabelAngle[pos = 1.1](A,M,X){$2$};  
\tkzLabelAngle[pos = 1.1](X,M,B){$1$};  
\end{tikzpicture}
\end{center}
\end{document}

答案1

从问题中看不出 X 应该如何定义,但我猜你想要的是圆线上与 O 相对的点。在这种情况下,最简单的方法是,只需在 M 处反射 O 即可得到 X:

 \documentclass{article}
 \usepackage{pgfplots}
 \usepackage{tkz-euclide}
 \usetkzobj{all}
 \begin{document}
 \begin{center}
\begin{tikzpicture}
\coordinate (M) at (0,0) ;
\coordinate (O) at (canvas polar cs:angle=110,radius=3cm) ;
\coordinate (A) at (canvas polar cs:angle=-130,radius=3cm);
\coordinate (B) at (canvas polar cs:angle=-30,radius=3cm) ;
% \coordinate (X) at (canvas polar cs:angle=-90,radius=3cm);
\tkzDefPointBy[symmetry=center M](O)\tkzGetPoint{X}
\draw (M) circle (3cm);
\draw (A) -- (M) -- (B);
\draw (A) -- (O) -- (B);
\tkzDrawLine[dashed, add= 0.2 and 1.3,color=black](O,M)
\tkzDrawPoints(O,A,B,M,X);
\tkzLabelPoints[left](A,M);
\tkzLabelPoints[below right](X);
\tkzLabelPoints[above left](O);
\tkzLabelPoints(B);
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](A,M,B);
\tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](A,O,B);
\tkzLabelAngle[pos = 1.2](A,O,M){$2$};  
\tkzLabelAngle[pos = 1.2](M,O,B){$1$}; 
\tkzLabelAngle[pos = 1.1](A,M,X){$2$};  
\tkzLabelAngle[pos = 1.1](X,M,B){$1$};  
\end{tikzpicture}
\end{center}
\end{document}

在此处输入图片描述

当然,你确实可能想要 OM 与圆的第二个交点,当且仅当 O 不在圆线上时,该交点才是另一个点。在这种情况下,将 X 的定义替换为

\tkzInterLC(O,M)(M,A)\tkzGetPoints{notinteresting}{X}

相关内容