Saturday, 24 August 2013

intersection of line and circle

intersection of line and circle

I want to define the point X dynamically. Now I have defined the point at
-90° but I want to make it changeable depending on the place of O. (I know
there are similar questions, but I don't find the answer on my problem.)

\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}

No comments:

Post a Comment