题库
试卷
组卷
图库
知识
等边三角形
核心代码解释:
等边三角形ABC
在坐标里 (60:4) 是极坐标表示方法,其中 60表示60度,4表示AC长度为4cm。
请注意C的坐标是(2,3.464);
其中2表示横坐标为2,纵坐标为3.464.
因为ABC为等边三角形,角A为60度,所以,C的纵坐标为 h/4= sin60 可得
h=4*sin60=3.464
\documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{positioning, calc} \begin{document} \begin{tikzpicture}[scale=0.8] \draw (0,0) -- (60:4) -- (4,0) -- cycle; \coordinate[label=left:$A$] (A) at (0,0); \coordinate[label=right:$B$] (B) at (4,0); \coordinate[label=above:$C$] (C) at (2,3.464); \end{tikzpicture} \end{document}