
아래와 같이 원과 선이 그리기 명령이라면 교차점을 얻을 수 있나요? 이 예에서는 이제 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)는 원의 중심이자 원 위의 점입니다.