Sierpinski Triangles and Carpets

by pmoews, published

Sierpinski Triangles and Carpets by pmoews Nov 16, 2012
1 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps



Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag


Thing Statistics

4779Views 3125Downloads Found in Math Art


Here is openSCAD code to make Sierpinski triangles and carpets. You can read about Sierpinski's work on Wikipedia or Wolfram Math. I like the article by Sylvie Champeaux at:


which explains how the Chaos Game leads to a Sierpinski triangle.

Sierpinski_triangle.stl is an ornament with a hole for hanging. The openSCAD code produced 81 separate triangles which were subtracted from a single triangle to make the ornament.

Sierpinski_carpet.stl is a carpet after three cycles of iteration.

Composite_carpet.stl is a composite of 3 carpets at different stages of iteration.

Sierpinski_all.stl is a carpet where the central square has been replaced by a triangle.

The triangles and carpets are limited to 3 or 4 iterations here; attempts to go further ran into openSCAD program limitations. Note that Polymaker, (thing:8711), has created an attractive three dimensional version of the triangle.


These objects are easily and quickly printed with or without a raft.

Sierpinski_carpet.stl has the smallest features and perhaps prints better with a single shell and 50% infill. The smallest squares had to be made larger than is required by the generating algorithm so as to be properly sized by ReplicatorG.

More from Math Art

view more

All Apps

3D Print your file with 3D Hubs, the world’s largest online marketplace for 3D printing services.

App Info Launch App

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

3D Print a wide range of designs with Treatstock. Easy to use tools to get the perfect result. The global 3D printing network that connects you with high-quality and fast working print services nea...

App Info Launch App

ok  dxf posted - Sierpinski.carpet.dxf is properly scaled

Can you also post DXF files of these.. ??  For us poor folk with laser engravers?  Thx

You can make a DXF by using the projection() call. This will probably take forever and a day as the projection() function isn't super efficient. That will create a 2D shape that can be exported as a DXF.