我想画一幅画,展示学生如何构造圆的切线。这意味着要画一个三角板,我想在三角板的孔中看到圆的剩余部分。这就是我现在的情况,但我现在陷入困境。任何帮助都将不胜感激。如果可能的话,我更喜欢 KISS 解决方案 ;-)!
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=1.8]
\node[fill, circle, minimum size=1pt, inner sep=2pt, label={[black, below left]:$O$}] (O) at (0,0) {} ;
\node[fill, circle, minimum size=1pt, inner sep=2pt, label={[black, below right]:$A$}] (A) at (-60:1) {} ;
\draw[very thick] (0,0) circle (1cm) ;
\node at (-.8,.8) {$C$} ;
\draw[very thick, gray, dashed] (O) -- (A) ;
\node[shift={(30:4)}] (B) at (A.30) {} ;
\node[shift={(-150:1)}] (C) at (A.-150) {} ;
\draw[very thick, red] (B) node[above left] {$d$} -- (C) ;
\draw[very thick, fill=gray, opacity=.5] (A) -- ++(120:.8) -- ++(0:1.6) -- (A) ;
\draw[very thick, draw, fill=white, opacity=.5] (A) ++(75:.2) coordinate (D) -- ++(120:.43) -- ++(0:.86) -- (D) ;
\end{tikzpicture}
\end{document}
答案1
啊!我找到答案了,感谢jake 在“突出显示 TikZ 图形的一部分”中。
以下是代码:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=1.8, remember picture]
\node[fill, circle, minimum size=1pt, inner sep=2pt, label={[black, below left]:$O$}] (O) at (0,0) {} ;
\node[fill, circle, minimum size=1pt, inner sep=2pt, label={[black, below right]:$A$}] (A) at (-60:1) {} ;
\draw[very thick] (0,0) circle (1cm) ;
\node at (-.8,.8) {$C$} ;
\draw[very thick, gray, dashed, shorten >=-7mm, shorten <=-10mm] (O) -- (A) ;
\node[shift={(30:4)}] (B) at (A.30) {} ;
\node[shift={(-150:1)}] (C) at (A.-150) {} ;
\draw[very thick, red] (B) node[above left] {$d$} -- (C) ;
\end{tikzpicture}
\begin{tikzpicture}[remember picture, overlay, even odd rule, scale=1.8]
\filldraw[draw=black, fill=lightgray, opacity=1]
(A) -- ++(120:.8) -- ++(0:1.6) -- (A)
(A) ++(75:.2) coordinate (D) -- ++(120:.43) -- ++(0:.86) -- (D) ;
\end{tikzpicture}
\end{document}