题库
试卷
组卷
图库
知识
三角形外接圆
核心代码解释:
三角形外接圆。
其中 \coordinate (O) at ($(A)!0.5!(B)$) ; 表示O的坐标为以A为起点,AB距离的一半
veclen为求2个坐标之间的距离。
\documentclass[tikz,border=0.125cm]{standalone} \usetikzlibrary{calc,intersections} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0) ; \coordinate (B) at (-2,-3) ; \coordinate (C) at (0,-3) ; \coordinate (O) at ($(A)!0.5!(B)$) ; \draw let \p1=(A), \p2=(O), \n1={veclen(\x2-\x1,\y2-\y1)} in (O) circle [radius=\n1]; \draw (A) -- (B) -- (C) -- cycle; \foreach \p/\a in {A/above,O/left,B/below,C/right } \node [inner sep=1pt, circle, fill, label=\a:\p] at (\p) {}; \end{tikzpicture} \end{document}