|
本帖最后由 青青子衿 于 2017-3-10 12:21 编辑 正方形\(ABCD\)外切于圆\(O\),在正方形\(ABCD\)内随机取两点\(E\)、\(F\),线段\(EF\)与圆\(O\)相交的概率为?
tikz码:- \documentclass{article}
- \usepackage{tikz}
- \usetikzlibrary{intersections,calc,through}
- \begin{document}
- \begin{tikzpicture}
- [dot/.style={circle,inner sep=1pt,fill,label={#1},name=#1},
- extended line/.style={shorten >=-#1,shorten <=-#1},
- extended line/.default=3cm]
- \coordinate [label=below:$O$] (O) at (3,3);
- \fill(O) circle (1.5pt);
- \coordinate [label=above left:$A$] (A) at (0,6);
- \fill(A) circle (1.5pt);
- \coordinate [label=above right:$B$] (B) at (6,6);
- \fill(B) circle (1.5pt);
- \coordinate [label=below right:$C$] (C) at (6,0);
- \fill(C) circle (1.5pt);
- \coordinate [label=below left:$D$] (D) at (0,0);
- \fill(D) circle (1.5pt);
- \coordinate [label=below left:$E_1$] (E) at (4.4,5.8);
- \fill(E) circle (1.5pt);
- \coordinate [label=below left:$F_1$] (F) at (5.9,4.1);
- \fill(F) circle (1.5pt);
- \draw[red] [name path=EF] (E) -- (F);
- \draw [name path=Cir] (3,3)circle(3);
- \path [name intersections={of = Cir and EF}];
- \coordinate[label=right:$P_1$] (P) at (intersection-1);
- \fill(P) circle (1pt);
- \coordinate[label=left:$Q_1$] (Q) at (intersection-2);
- \fill(Q) circle (1pt);
- \draw(0,0)rectangle(6,6);
- \node [dot=above right:$E_2$] (J) at (0.55,1) {};
- \node [dot=right:$F_2$] (K) at (0.32,0.3) {};
- \draw [red] (J) -- (K);
- \draw [style=dashed] (J) -- ($(K)!5.0cm!(J)$);
- \draw [style=dashed,extended line=1.0cm] ($(J)!(O)!(K)$) -- (O);
- \fill [red] ($(J)!(O)!(K)$) circle [radius=2pt];
- \end{tikzpicture}
- \end{document}
复制代码 |
|