如何在 TikZ 中绘制带有三角形的圆圈?

如何在 TikZ 中绘制带有三角形的圆圈?

抱歉,我无法提供所有点的坐标,或者我可以画图。我该如何制作这个图?谢谢您的帮助!

在此处输入图片描述

答案1

在这种情况下,使用calcintersections库非常简单:

\documentclass[tikz,border=0.125cm]{standalone}

\usetikzlibrary{calc,intersections}

\begin{document}

\begin{tikzpicture}

\path [rotate=60]
  (0,0)   coordinate (A) 
  (-2,-3) coordinate (B) 
  (0,-3)  coordinate (C)
  ($(B)!2!(C)$)   coordinate (D)
  ($(A)!0.5!(B)$) coordinate (O);

\path [name path=first]  (A) -- (D);
\path [name path=second] (C) -- ($(C)!1!-90:(O)$);

\path [name intersections={of=first and second}]
 (intersection-1) coordinate (E);

\draw (A) -- (B) -- (C) -- (D) -- cycle;
\draw let \p1=(A), \p2=(O), \n1={veclen(\x2-\x1,\y2-\y1)} in (O) circle [radius=\n1];
\draw (A) -- (C);
\draw (C) -- (E);

\foreach \p/\a in {A/above,O/left,B/below,C/right,D/right,E/above}
  \node [inner sep=1pt, circle, fill, label=\a:\p] at (\p) {};

\end{tikzpicture}

\end{document}

在此处输入图片描述

答案2

推荐使用 PSTricks 解决方案(另外由于您居住在中国澳门,因此还支持中文字符),仅适合最佳实践者。

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl}
\usepackage{CJKutf8}
\newsavebox\IBox

\begin{document}
\begin{CJK}{UTF8}{bsmi}
\savebox\IBox{中}

\begin{pspicture}[showgrid=false](5.75,4.25)
    \pstGeonode[PosAngle={180,135,-45},PointName={\usebox\IBox,default}]
        (2,2){O}
        ([nodesep=2,angle=110]O){A}
        ([nodesep=2,angle=-70]O){B}
        ([nodesep=2,angle=-10]O){C}
    \nodexn{2(C)-(B)}{D'}
    \pnode([offset=3,nodesep=2]{C}O){E'}
    \pstInterLL[PosAngle=90]{C}{E'}{A}{D'}{E}
    \pstGeonode(D'){D}
    \pstCircleOA{O}{A}
    \pspolygon(A)(B)(D)
    \pspolygon(A)(C)(E)
\end{pspicture}

\end{CJK}
\end{document}

在此处输入图片描述

玩转汉字

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl}
\usepackage{CJKutf8}
\newsavebox\IBoxO
\newsavebox\IBoxA
\newsavebox\IBoxB
\newsavebox\IBoxC
\newsavebox\IBoxD
\newsavebox\IBoxE

\begin{document}
\begin{CJK}{UTF8}{bsmi}
\savebox\IBoxO{中}
\savebox\IBoxA{北}
\savebox\IBoxB{南}
\savebox\IBoxC{東}
\savebox\IBoxD{北東部}
\savebox\IBoxE{東北}

\begin{pspicture}[showgrid=false](6,4.25)
    \pstGeonode[PosAngle={180,150,155,185},
        PointName={\usebox\IBoxO,\usebox\IBoxA,\usebox\IBoxB,\usebox\IBoxC}]
        (2,2){O}
        ([nodesep=2,angle=110]O){A}
        ([nodesep=2,angle=-70]O){B}
        ([nodesep=2,angle=-10]O){C}
    \nodexn{2(C)-(B)}{D'}
    \pnode([offset=3,nodesep=2]{C}O){E'}
    \pstInterLL[PosAngle=90,PointName=\usebox\IBoxE]{C}{E'}{A}{D'}{E}
    \pstGeonode[PosAngle=50,PointName=\usebox\IBoxD](D'){D}
    \pstCircleOA{O}{A}
    \pspolygon(A)(B)(D)
    \pspolygon(A)(C)(E)
\end{pspicture}

\end{CJK}
\end{document}

在此处输入图片描述

答案3

这是一个很好的事情元帖子。这被包装在 中luamplib,因此用 进行编译lualatex

在此处输入图片描述

\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);
    numeric t; t = 5.25;
    path O; O = fullcircle scaled 144 rotated 100;

    z.A = point 0 of O;
    z.B = point 4 of O;
    z.C = point t of O;
    z.D = z.B reflectedabout(z.A, z.C);
    z.E = whatever[z.A, z.D];
    z.E - z.C = whatever * direction t of O;

    draw O withcolor 2/3 blue;
    draw z.A -- z.B -- z.D -- z.A -- z.C -- z.E;

    dotlabel.llft("$O$", origin);
    forsuffixes @=A, B, C, D, E: 
        drawdot z@ withpen pencircle scaled dotlabeldiam;
        label("$" & str @ & "$", z@ scaled ((abs z@ + 8) / abs z@) shifted up);
    endfor

    label.urt("$BC=CD$, $CE$ is tangent to $O$", (x.C - 12, y.B)) withcolor 2/3 red;
endfig;
\end{mplibcode}
\end{document}

相关内容