Sierpinski Triangle $—$ A Transformational Approach
The starting point for producing a Sierpinski triangle of order n is a single black triangle. This is the order zero triangle.
The transformations that produce a Sierpinski triangle of order n from one of order (n-1) first shrink the one of order (n-1) to half its size and then fill in the vacated space with two translated copies of the shrunken triangle.
shrink := ScalingTransform[{.5, .5}];
copy1 := TranslationTransform[starter[[1, 2]]/2];
copy2 := TranslationTransform[starter[[1, 3]]/2];
Given an object representing a Sierpinski triangle of order n, produce and return another of order (n+1).
sierpinskiPts[pts : {{{_, _}, {_, _}, {_, _}} ..}] :=
Module[{stage1},
stage1 = Map[shrink, Flatten[pts, 1], {-2}];
Partition[Flatten[{stage1, copy1 @ stage1, copy2 @ stage1}, 1], 3]];
Produce and return a representation of a Sierpinski triangle of order n. The representation is cached as a down value as a side effect.
sierpinski[n_Integer?Positive] := (sierpinski[n] = sierpinskiPts[sierpinski[n - 1]])
Unit tests
Starting with an equilateral triangle
Initialization. The 2nd line of code clears out any previously cached triangles.
starter = {{{0., 0.}, {1./2, Sqrt[3.]/2}, {1., 0.}}};
DownValues[sierpinski] = Last[DownValues[sierpinski]];
sierpinski[1] = sierpinskiPts[starter];
An order 3 Sierpinski triangle.
Graphics[Polygon[sierpinski[3]], Frame -> True]
Starting with a right triangle
starter = {{{0., 0.}, {0., 1.}, {1., 0.}}};
DownValues[sierpinski] = Last[DownValues[sierpinski]];
sierpinski[1] = sierpinskiPts[starter];
An order 4 Sierpinski triangle.
Graphics[Polygon[sierpinski[4]], Frame -> True]
Reference
Chaos and Fractals (Springer-Verlag, February 2004) by Heinz-Otto Peitgen, Hartmut Jürgens, Dietmar Saupe.
The ideas that went into this answer are very close to and inspired by those explored in the sections of the reference devoted to the MRCM (Multiple Reduction Copy Machine).