tikz 圓和線的交點

tikz 圓和線的交點

如果圓和線是如下的繪製指令,是否可以得到交集?對於本例,C 點現在是硬編碼的。

\documentclass[border=5pt,convert={density=300,outext=.jpg}]{standalone}
\usepackage{tikz} 
\usetikzlibrary{positioning}
\begin{document}
\tikzset{>=latex}
\tiny\begin{tikzpicture}
 \coordinate (O) at (0,0);
 \coordinate (A) at (1,0);
 \coordinate (B) at (1,1.732);
 \draw[->] (0,0) -- (2,0);
 \draw[->] (0,0) -- (0,2);
 \draw (A) circle (1);
 \draw (A) -- (1,2);
 \draw (O) -- (B);
 \coordinate (C) at (0.5,0.861);//fix me with intersection of circle and line
 \draw (A) -- (C); 
 % annotation
 \draw[fill=red] (O) circle (1pt)  node[below left=0 of O] {O};
 \draw[fill=red] (A) circle (1pt)  node[below right=0 of A] {A};
 \draw[fill=red] (B) circle (1pt)  node[above right=0 of B] {B};
 \draw[fill=red] (C) circle (1pt)  node[above left=0 of C] {C};
\end{tikzpicture} 
\end{document}

輸出:

在此輸入影像描述

答案1

考慮使用 tkz-euclide 套件。有一個指令可以找到直線和圓的交點。

以下內容來自 highschoolmathandchess.com:

tkzInterLC(A,B)(C,D) 其中 (A,B) 是直線上的點,(C,D) 是圓心和圓上的點。

相關內容