With DrGeo, in a workspace, an interactive Sierpinski triangle can be computed when executing:

triangle := [:s1 :s2 :s3 :n |
    c segment: s1 to: s2;
        segment: s2 to: s3;
        segment: s3 to: s1.
    n >0 ifTrue:
        [triangle
            value: s1
            value: (c middleOf: s1 and: s2) hide
            value: (c middleOf: s1 and: s3) hide
            value: n-1.
        triangle
            value: (c middleOf: s1 and: s2) hide
            value: s2
            value: (c middleOf: s2 and: s3) hide
            value: n-1.
        triangle
            value: (c middleOf: s1 and: s3) hide
            value: (c middleOf: s2 and: s3) hide
            value: s3
            value: n-1.]].

c := DrGeoCanvas new.
triangle
    value: (c point: 0 @ 3)
    value: (c point: 4 @ -3)
    value: (c point: -4 @ -3)
    value: 3.

Of course, the result is all interactive.

Sierpinski triangle