Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[multi=tikzpicture]{standalone}
- \usepackage{tikz}
- \newcommand{\sier}[1]{
- \fill[white,draw=black,line join=bevel] (30:1) -- (150:1) -- (270:1) -- cycle;
- \node[red,transform shape] at (0,0) {#1};
- \ifnum#1>0
- \foreach \theta in {90,210,330}
- {
- \begin{scope}[shift={(\theta:1)},scale=0.5]
- \expandafter\sier\expandafter{\the\numexpr#1-1\relax}
- \end{scope}
- }
- \fi
- }
- \begin{document}
- \begin{tikzpicture}
- \fill[green,draw=black] (90:2) -- (210:2) -- (330:2) -- cycle;
- \sier4
- \end{tikzpicture}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement