# TikZ/PGF drawing Sierpinski triangle for predefined iteration-level [duplicate]

I would like to draw some iteration levels of the Sierpinski triangle. Lets say I'm ok for Iteration 0-4: line, triangle, first times devided triangle (triforce ;) ), ...

Is there a way to do it like the Koch snowflake?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.fractals}
\begin{document}
\begin{tikzpicture}[decoration=Koch snowflake]
\draw decorate{ decorate{ decorate{ decorate{ (0,0) -- (3,0) }}}};
\end{tikzpicture}
\end{document}


I can't find any nice solution in the www.

Further I would like to print only a part of the next lvl. Lets say we have the basic triangle of step 1. In step 2 you will devide the whole triangle in 4 congruent triangles. I would like only to print the next step in the upper part.

(for each Step until 4)

The last mission I am facing: I want to add three curved lines, from each edge of the basic triangle to the right of the triangle and enter some Text. So they shall stop in a neighbourhood of the text. I guess, if I finished the previous step, this one might be pretty easy.

thank you all for reading and helping :)

## marked as duplicate by cfr tikz-pgf StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jan 28 '17 at 0:50

• Just use \draw rather than \fill if you want to draw rather than filling. The TikZ manual covers the lindenmayersystems library as it is built-in. Jake's answer shows you how to use it to draw these triangles. I don't understand what you mean by 'not in my sense'. If you want a Sierpinski triangle which is not a Sierpinski triangle in the sense of a Sierpinski triangle, you need to explain that, say, by 'Sierpinski triangle', you mean 'crescent moon' or whatever. – cfr Jan 31 '17 at 17:03