我画了一个十二边形并对它进行了解剖。
\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[line join=round, scale=2]
\foreach \n in {0,1,...,5}
\coordinate (A\n) at (\n*60:1);
\foreach \n in {0,1,...,11}
\coordinate (B\n) at (\n*30+15:1+3^.5/2);
\fill[cyan] (B3) -- (B4) -- (B5) -- (B6) -- (B7) -- (B8) -- cycle;
\draw (A0)
\foreach \n in {1,2,...,5}{
-- (A\n)
}
-- cycle;
\foreach \n in {0,1,2,...,5}{
\draw (0,0) -- (A\n);
}
\draw (B0)
\foreach \n in {1,2,...,11}{
-- (B\n)
}
-- cycle;
\foreach \x/\y in {0/0, 1/1, 1/2, 2/3, 2/4, 3/5, 3/6, 4/7, 4/8, 5/9, 5/10, 0/11}
\draw (A\x) -- (B\y);
\draw[ultra thick, blue] (A1) circle (.15);
\draw[ultra thick, blue] (A5) circle (.15);
\draw[ultra thick, red] (A2) circle (.15);
\draw[ultra thick, red] (A4) circle (.15);
\end{tikzpicture}
\end{document}
看起来不错。但我发现有些不对劲。你能在红色和蓝色圆圈里看到它们吗?
彩色区域的边界必须经过六边形的顶点。如果将“(\n*30+15:1+3^.5/2)”更改为“(\n*30+15:1+3.5^.5/2)”,则边界恰好与顶点相交。但是,我无法理解。
答案1
外部顶点的半径应为内部顶点半径的 2*cos(15) 倍。
\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[line join=round, scale=2]
\foreach \n in {0,1,...,5}
\coordinate (A\n) at (\n*60:1);
\foreach \n in {0,1,...,11}
\coordinate (B\n) at (\n*30+15:{2*cos(15)});
\fill[cyan] (B3) -- (B4) -- (B5) -- (B6) -- (B7) -- (B8) -- cycle;
\draw (A0)
\foreach \n in {1,2,...,5}{
-- (A\n)
}
-- cycle;
\foreach \n in {0,1,2,...,5}{
\draw (0,0) -- (A\n);
}
\draw (B0)
\foreach \n in {1,2,...,11}{
-- (B\n)
}
-- cycle;
\foreach \x/\y in {0/0, 1/1, 1/2, 2/3, 2/4, 3/5, 3/6, 4/7, 4/8, 5/9, 5/10, 0/11}
\draw (A\x) -- (B\y);
\draw[ultra thick, blue] (A1) circle (.15);
\draw[ultra thick, blue] (A5) circle (.15);
\draw[ultra thick, red] (A2) circle (.15);
\draw[ultra thick, red] (A4) circle (.15);
\draw[purple] (0,0) -- (B3);
\draw[purple] (120:0.4) arc(120:105:0.4) coordinate[midway] (arc) node[above
right=0.1cm] (15){$15^\circ$};
\draw[purple,-latex] (15.west) to[out=170,in=100] (arc);
\end{tikzpicture}
\end{document}
编辑:添加了紫色插图。(还请注意,1+sqrt(3.5)/2=1.93541...
而2*cos(15)=1.93185...
,即 是一个1+sqrt(3.5)/2
有效的数字意外。)