第15种单面凸五角型,发现于2015年。
我画出了这个五边形拼贴的主要块,但是我无法用“For”复制这个块。
\documentclass{report}
\usepackage{geometry}
\geometry{paperwidth=40cm,paperheight=25cm,margin=1cm}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzset{c/.style={every coordinate/.try}}
\tikzset{d/.style={every coordinate/.try}}
\usetikzlibrary{plotmarks}
\definecolor{green1}{cmyk}{1,0,.6,0}
\definecolor{leafgreen}{cmyk}{1, 0, 0.8, 0}
\definecolor{black}{cmyk}{0,0,0,1}
\begin{document}
\color{black}
\begin{tikzpicture}[line width=10pt, scale=1]
\draw (0,0) coordinate (A) node {A};
\draw (2.5,0) coordinate (E) node {E};
\draw ($ (A)!2.5cm!90:(E) $) coordinate (B) node {B};
\draw ($ (B)! 4.829625cm!105: (A) $) coordinate (C) node{C};
\draw ($ (C)! 2.5cm!135: (B) $) coordinate(D) node {D};
\draw ($ (C)!2.5cm!90:(D) $) coordinate(F) node {F};
\draw ($ (F)! 4.829625cm!105: (C) $) coordinate(G) node {G};
\draw ($ (G)! 2.5cm!135: (F) $) coordinate(H) node {H};
\draw ($ (F)!5cm!300:(C) $) coordinate(I) node {I};
\draw ($ (I)!2.5cm!-150:(F) $) coordinate(J) node {J};
\draw ($ (E)!2.5cm!0: (D) $) coordinate (X) node {X};
\begin{scope}
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\begin{scope}[every coordinate/.style={shift={($(X)-(J)$)}}]
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\end{tikzpicture}
\end{document}
答案1
我不确定你到底在寻找什么,但在这倒数第二个圣诞前夜,几个嵌套的\stackinset
S 构成了一幅美妙的节日彩色玻璃仿制品。愿上帝保佑我们每一个人!
\documentclass{report}
\usepackage{geometry}
\geometry{paperwidth=40cm,paperheight=25cm,margin=1cm}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzset{c/.style={every coordinate/.try}}
\tikzset{d/.style={every coordinate/.try}}
\usetikzlibrary{plotmarks}
\definecolor{green1}{cmyk}{1,0,.6,0}
\definecolor{leafgreen}{cmyk}{1, 0, 0.8, 0}
\definecolor{black}{cmyk}{0,0,0,1}
\usepackage{stackengine}
\begin{document}
\savestack\Tile{%
\color{black}
\begin{tikzpicture}[line width=10pt, scale=1]
\draw (0,0) coordinate (A) node {A};
\draw (2.5,0) coordinate (E) node {E};
\draw ($ (A)!2.5cm!90:(E) $) coordinate (B) node {B};
\draw ($ (B)! 4.829625cm!105: (A) $) coordinate (C) node{C};
\draw ($ (C)! 2.5cm!135: (B) $) coordinate(D) node {D};
\draw ($ (C)!2.5cm!90:(D) $) coordinate(F) node {F};
\draw ($ (F)! 4.829625cm!105: (C) $) coordinate(G) node {G};
\draw ($ (G)! 2.5cm!135: (F) $) coordinate(H) node {H};
\draw ($ (F)!5cm!300:(C) $) coordinate(I) node {I};
\draw ($ (I)!2.5cm!-150:(F) $) coordinate(J) node {J};
\draw ($ (E)!2.5cm!0: (D) $) coordinate (X) node {X};
\begin{scope}
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\begin{scope}[every coordinate/.style={shift={($(X)-(J)$)}}]
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\end{tikzpicture}}
\stackinset{l}{4\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{3\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{2\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{170pt}{b}{-96pt}{\Tile}{%
\Tile}}}}
\end{document}
将其推导出合乎逻辑的结论(已编辑为使用快速运行的\Longstack
s 而不是嵌套的\stackinset
s):
\documentclass{report}
\usepackage{geometry}
\geometry{paperwidth=40cm,paperheight=20cm,margin=0cm}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzset{c/.style={every coordinate/.try}}
\tikzset{d/.style={every coordinate/.try}}
\usetikzlibrary{plotmarks}
\definecolor{green1}{cmyk}{1,0,.6,0}
\definecolor{leafgreen}{cmyk}{1, 0, 0.8, 0}
\definecolor{black}{cmyk}{0,0,0,1}
\usepackage{stackengine}
\begin{document}
\savestack\Tile{%
\color{black}
\begin{tikzpicture}[line width=10pt, scale=1]
\draw (0,0) coordinate (A) node {A};
\draw (2.5,0) coordinate (E) node {E};
\draw ($ (A)!2.5cm!90:(E) $) coordinate (B) node {B};
\draw ($ (B)! 4.829625cm!105: (A) $) coordinate (C) node{C};
\draw ($ (C)! 2.5cm!135: (B) $) coordinate(D) node {D};
\draw ($ (C)!2.5cm!90:(D) $) coordinate(F) node {F};
\draw ($ (F)! 4.829625cm!105: (C) $) coordinate(G) node {G};
\draw ($ (G)! 2.5cm!135: (F) $) coordinate(H) node {H};
\draw ($ (F)!5cm!300:(C) $) coordinate(I) node {I};
\draw ($ (I)!2.5cm!-150:(F) $) coordinate(J) node {J};
\draw ($ (E)!2.5cm!0: (D) $) coordinate (X) node {X};
\begin{scope}
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\begin{scope}[every coordinate/.style={shift={($(X)-(J)$)}}]
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\end{tikzpicture}}
% NOW START STACKING THE \Tile
\newlength\Hshft%
\setstackEOL{\\}%
\setstackgap{L}{96pt}%
\setlength\Hshft{340pt}%
\savestack\Vtile{\smash{\hsmash{\Longstack{%
\Tile\\
\hspace{\Hshft}\Tile\\
\hspace{2\Hshft}\Tile\\
\hspace{3\Hshft}\Tile\\
\hspace{4\Hshft}\Tile\\
\hspace{5\Hshft}\Tile\\
\hspace{6\Hshft}\Tile\\
\hspace{7\Hshft}\Tile\\
\hspace{8\Hshft}\Tile%
}}}}%
\setstackgap{L}{-210pt}%
\setlength\Hshft{2490pt}%
\hspace{-1630pt}\raisebox{-800pt}{\Longstack{\Vtile\\\hspace{\Hshft}\Vtile}}
\end{document}
为了理解什么是堆叠块\Tile
、\Vtile
和\VVtile
,我在扩展页面大小上提供了这个示例:
\documentclass{report}
\usepackage{geometry}
\geometry{paperwidth=135cm,paperheight=115cm,margin=1cm}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzset{c/.style={every coordinate/.try}}
\tikzset{d/.style={every coordinate/.try}}
\usetikzlibrary{plotmarks}
\definecolor{green1}{cmyk}{1,0,.6,0}
\definecolor{leafgreen}{cmyk}{1, 0, 0.8, 0}
\definecolor{black}{cmyk}{0,0,0,1}
\usepackage{stackengine}
\begin{document}
\savestack\Tile{%
\color{black}
\begin{tikzpicture}[line width=10pt, scale=1]
\draw (0,0) coordinate (A) node {A};
\draw (2.5,0) coordinate (E) node {E};
\draw ($ (A)!2.5cm!90:(E) $) coordinate (B) node {B};
\draw ($ (B)! 4.829625cm!105: (A) $) coordinate (C) node{C};
\draw ($ (C)! 2.5cm!135: (B) $) coordinate(D) node {D};
\draw ($ (C)!2.5cm!90:(D) $) coordinate(F) node {F};
\draw ($ (F)! 4.829625cm!105: (C) $) coordinate(G) node {G};
\draw ($ (G)! 2.5cm!135: (F) $) coordinate(H) node {H};
\draw ($ (F)!5cm!300:(C) $) coordinate(I) node {I};
\draw ($ (I)!2.5cm!-150:(F) $) coordinate(J) node {J};
\draw ($ (E)!2.5cm!0: (D) $) coordinate (X) node {X};
\begin{scope}
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\begin{scope}[every coordinate/.style={shift={($(X)-(J)$)}}]
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\end{tikzpicture}}
% NOW START STACKING THE \Tile
\newlength\Hshft%
\setstackEOL{\\}%
\setstackgap{L}{96pt}%
\setlength\Hshft{340pt}%
\savestack\Vtile{\smash{\hsmash{\Longstack{%
\Tile\\
\hspace{\Hshft}\Tile\\
\hspace{2\Hshft}\Tile\\
\hspace{3\Hshft}\Tile\\
\hspace{4\Hshft}\Tile\\
\hspace{5\Hshft}\Tile\\
\hspace{6\Hshft}\Tile\\
\hspace{7\Hshft}\Tile\\
\hspace{8\Hshft}\Tile%
}}}}%
\setstackgap{L}{-210pt}%
\setlength\Hshft{2490pt}%
\savestack\VVtile{\Longstack{\Vtile\\\hspace{\Hshft}\Vtile}}%
\parskip 300pt\Huge\vspace*{500pt}
This is a tile: \Tile
This is a tile stack: \Vtile
And this is two tile stacks:\par
\hspace{-630pt}\raisebox{-800pt}{\VVtile}
\end{document}
这是原始的(长期运行的)\stackinset
变体:
\documentclass{report}
\usepackage{geometry}
\geometry{paperwidth=40cm,paperheight=25cm,margin=1cm}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzset{c/.style={every coordinate/.try}}
\tikzset{d/.style={every coordinate/.try}}
\usetikzlibrary{plotmarks}
\definecolor{green1}{cmyk}{1,0,.6,0}
\definecolor{leafgreen}{cmyk}{1, 0, 0.8, 0}
\definecolor{black}{cmyk}{0,0,0,1}
\usepackage{stackengine}
\begin{document}
\savestack\Tile{\smash{\hsmash{%
\color{black}
\begin{tikzpicture}[line width=10pt, scale=1]
\draw (0,0) coordinate (A) node {A};
\draw (2.5,0) coordinate (E) node {E};
\draw ($ (A)!2.5cm!90:(E) $) coordinate (B) node {B};
\draw ($ (B)! 4.829625cm!105: (A) $) coordinate (C) node{C};
\draw ($ (C)! 2.5cm!135: (B) $) coordinate(D) node {D};
\draw ($ (C)!2.5cm!90:(D) $) coordinate(F) node {F};
\draw ($ (F)! 4.829625cm!105: (C) $) coordinate(G) node {G};
\draw ($ (G)! 2.5cm!135: (F) $) coordinate(H) node {H};
\draw ($ (F)!5cm!300:(C) $) coordinate(I) node {I};
\draw ($ (I)!2.5cm!-150:(F) $) coordinate(J) node {J};
\draw ($ (E)!2.5cm!0: (D) $) coordinate (X) node {X};
\begin{scope}
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\begin{scope}[every coordinate/.style={shift={($(X)-(J)$)}}]
\begin{scope}
\draw [top color=green!30,bottom color=green!90]
(A) -- (E) -- (X) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle;
\draw (B) -- (C) -- (F);
\draw (B) -- (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw [top color=red!30,bottom color=red!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw [top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E)-- ([c]X) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw [top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]X)-- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle;
\draw ([c]B) -- ([c]C) -- ([c]F);
\draw ([c]B) -- ([c]C) -- ([c]D);
\end{scope}
\end{scope}
\end{tikzpicture}}}}
\stackinset{l}{\dimexpr-55pt+\dimexpr-2\dimexpr170pt}{b}{5\dimexpr96pt}{\Tile}{%
\stackinset{l}{\dimexpr-55pt+\dimexpr-1\dimexpr170pt}{b}{4\dimexpr96pt}{\Tile}{%
\stackinset{l}{\dimexpr-55pt+\dimexpr0\dimexpr170pt}{b}{3\dimexpr96pt}{\Tile}{%
\stackinset{l}{\dimexpr-55pt+\dimexpr1\dimexpr170pt}{b}{2\dimexpr96pt}{\Tile}{%
\stackinset{l}{\dimexpr-55pt+\dimexpr2\dimexpr170pt}{b}{1\dimexpr96pt}{\Tile}{%
\stackinset{l}{\dimexpr-55pt+\dimexpr3\dimexpr170pt}{b}{-306pt}{\Tile}{%
\stackinset{l}{9\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{8\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{7\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{6\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{5\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{4\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{3\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{2\dimexpr170pt}{b}{-96pt}{\Tile}{%
\stackinset{l}{170pt}{b}{-96pt}{\Tile}{%
\Tile}}}}}}}}}}}}}}}
\end{document}
答案2
我知道这是一个老问题,但这是一个纯钛钾Z 方式来实现。
% arara: pdflatex
\documentclass[tikz,margin=1cm]{standalone}
\usetikzlibrary{calc}
\tikzset{
c/.style={every coordinate/.try},
twelvepentagons/.pic={
\path (0,0) coordinate (A)
(A) ++ (0:1) coordinate (E)
(A) ++ (90:1) coordinate (B)
(E) ++ (30:2) coordinate (D)
(D) ++ (150:1) coordinate (C)
(C) ++ (60:1) coordinate (F)
(D) ++ (0:2) coordinate (H)
(H) ++ (120:1) coordinate (G)
(F) ++ (180:2) coordinate (I)
(B) ++ (120:1) coordinate (J)
(E) ++ (30:1) coordinate (X);
\begin{scope}[every coordinate/.style={shift={($(X)-(J)$)}}]
\begin{scope}
\draw[top color=green!30,bottom color=green!90]
(A) -- (E) -- (D) -- (H) -- (G) -- (F) -- (I) -- (J) -- (B) -- cycle
(B) -- (C) -- (F) (C) -- (D);
\end{scope}
\begin{scope}[every coordinate/.style={rotate=-60,yscale=-1,shift={($(J)-(A)$)}}]
\draw[top color=red!30,bottom color=red!90]
([c]A) -- ([c]E) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle
([c]B) -- ([c]C) -- ([c]F) ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,yscale=-1,shift={($(G)-(A)+(H)-(A)$)}}]
\draw[top color=blue!30,bottom color=blue!90]
([c]A) -- ([c]E) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle
([c]B) -- ([c]C) -- ([c]F) ([c]C) -- ([c]D);
\end{scope}
\begin{scope}[every coordinate/.style={xscale=-1,rotate=60,shift={($(G)-(A)+(H)-(A)-(J)+(A)$)}}]
\draw[top color=yellow!30,bottom color=yellow!90]
([c]A) -- ([c]E) -- ([c]D) -- ([c]H) -- ([c]G) -- ([c]F) -- ([c]I) -- ([c]J) -- ([c]B) -- cycle
([c]B) -- ([c]C) -- ([c]F) ([c]C) -- ([c]D);
\end{scope}
\end{scope}
}
}
\begin{document}
\begin{tikzpicture}[line width=5pt]
\foreach \i in {0,...,3} {
\pgfmathsetmacro\basex{\i*10.330127} % (12+5sqrt(3))/2
\pgfmathsetmacro\basey{\i*6.964102} % (7+4sqrt(3))/2
\foreach \j in {0,...,10} {
\pgfmathsetmacro\thisx{\basex+\j*2.366025} % (3+sqrt(3))/2
\pgfmathsetmacro\thisy{\basey-\j*1.366025} % -(1+sqrt(3))/2
\pic at (\thisx,\thisy) {twelvepentagons};
}
}
\end{tikzpicture}
\end{document}
一些说明:
- 我以前
pic
会存储主块,这样主代码体就比较简单了。现在你只需要在循环中找到要乘以的正确系数,但我已经在那里计算过了。 - 我稍微简化了你的代码。并对其进行了缩进。使用缩进的代码总是比使用未缩进的代码更容易。
- 我将单位边长改为 1。如果您愿意,只需将这里的所有数字乘以 2.5。