参考: 如何画出两个相切圆的切线并标记点
参照上面的链接,我试图制作下图。但我无法用红色绘制图中增加的部分。此外,我想在点 R 和 I 处画两个直角标记。请帮助我。
我的 MWE:
\documentclass[12pt,a4paper]{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\Huge
\begin{tikzpicture}[scale=.8]
\tkzDefPoint(0,0){Origin}
\tkzDefPoint(12,0){O}
\pgfmathsetmacro{\Radius}{4}
\tkzTangent[from with R = O](Origin,\Radius cm) \tkzGetPoints{R}{I}
\tkzDrawCircle[R](Origin,\Radius cm)
\tkzDrawSegments[thick,black,add = 0 and .4](O,R O,I)
\tkzLabelPoints[left,above](R)
\tkzLabelPoints[left,below](I)
\tkzLabelPoints[right](O)
\tkzLabelPoint[left](Origin){$P$}
\end{tikzpicture}
\end{document}
答案1
这里是你的代码与之前的观察,对于箭头定制,你可以利用arrows.meta
库
代码
\documentclass[12pt,a4paper]{article}
\usepackage{tkz-euclide}
\usetikzlibrary{arrows.meta}
\usetkzobj{all}
\begin{document}
\Huge
\begin{tikzpicture}[scale=.8,> = {Stealth[length=10pt, inset=5pt]}]]
\tkzDefPoint(0,0){Origin}
\tkzDefPoint(12,0){O}
\pgfmathsetmacro{\Radius}{4}
\tkzTangent[from with R = O](Origin,\Radius cm) \tkzGetPoints{R}{I}
\tkzDrawCircle[R](Origin,\Radius cm)
\tkzDrawSegments[->,thick,black,add = 0 and .4](O,R O,I)
\tkzDrawSegments[thick,red](Origin,R Origin,I)
\tkzLabelPoints[left,above](R)
\tkzLabelPoints[left,below](I)
\tkzLabelPoints[right](O)
\tkzLabelPoint[left](Origin){$P$}
\end{tikzpicture}
\end{document}
输出