
Quero desenhar um hexágono rodeado de hexágonos congruentes ao original, com um total de 7 hexágonos. Posso fazer, mas não posso excluir o resto.
\documentclass[border=2mm, tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[x=7.5mm,y=4.34mm]
\tikzset{box/.style={regular polygon, regular polygon sides=6,
minimum size=10mm,
inner sep=0mm,outer sep=0mm, rotate=0, draw } }
\foreach \i in {0,...,1}
\foreach \j in {0,...,2} {\node[box] at (2*\i,2*\j) {};
\node[box] at (2*\i+1,2*\j+1) {}; }
\end{tikzpicture}
\end{document}
Responder1
Isso funciona para você?
\documentclass[border=2mm, tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[
x=7.5mm,y=4.34mm,
box/.style={
regular polygon,
regular polygon sides=6,
minimum size=10mm,
inner sep=0mm, outer sep=0mm,
draw}
]
\node [box] (innerbox) {};
\foreach [evaluate=\x as \y using {int(ifthenelse(\x+2>6,\x-4,\x+2))}] \x in {1,...,6}
\node [box,anchor=corner \y] at (innerbox.corner \x) {\pgfmathparse{int(mod(\x,2))}\pgfmathresult};
\end{tikzpicture}
\end{document}