
답변1
너비, 높이, 색상 등을 조정할 수 있습니다. 키는 설명이 필요하지 않으며 어떤 경우에도 설명서에 잘 설명되어 있습니다.
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\path foreach \Y [evaluate=\Y as \Xmax using {int(3-\Y)}] in {0,...,3}
{foreach \X in {-\Xmax,...,\Xmax}
{(\X,\Y) node[cylinder,draw,fill=green!80!black,rotate=90,minimum
width=4mm,minimum height=7mm]{}}};
\end{tikzpicture}
\end{document}