SierpinskiMesh
Details and Options

- SierpinskiMesh is also known as Sierpiński triangle and Sierpiński sponge.
- SierpinskiMesh[n] is generated from a triangle by repeatedly removing the middle triangle of the subsequent cells. »
- SierpinskiMesh[n] is equivalent to SierpinskiMesh[n,2].
- SierpinskiMesh takes the same options as MeshRegion, with the following additions:
-
DataRange Automatic the range of mesh coordinates to generate

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (3)Survey of the scope of standard use cases
Options (12)Common values & functionality for each option
DataRange (1)
DataRange allows you to specify the range of mesh coordinates to generate:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-ewpnb1


https://wolfram.com/xid/0d4h9ljuyi5u9mty-c5e4q9


https://wolfram.com/xid/0d4h9ljuyi5u9mty-fl0z4t


https://wolfram.com/xid/0d4h9ljuyi5u9mty-cil14m

MeshCellHighlight (2)
MeshCellHighlight allows you to specify highlighting for parts of a SierpinskiMesh:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-gbljzi

Individual cells can be highlighted using their cell index:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-de38c0


https://wolfram.com/xid/0d4h9ljuyi5u9mty-fxydv9

MeshCellLabel (2)
MeshCellLabel can be used to label parts of a SierpinskiMesh:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-bl33rv

Individual cells can be labeled using their cell index:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-bort25


https://wolfram.com/xid/0d4h9ljuyi5u9mty-be468t

MeshCellMarker (1)
MeshCellMarker can be used to assign values to parts of a SierpinskiMesh:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-klxbw7

Use MeshCellLabel to show the markers:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-wi9ar

MeshCellShapeFunction (2)
MeshCellShapeFunction can be used to assign values to parts of a SierpinskiMesh:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-breuv8

Individual cells can be drawn using their cell index:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-mw7gs4


https://wolfram.com/xid/0d4h9ljuyi5u9mty-f41ype

MeshCellStyle (2)
MeshCellStyle allows you to specify styling for parts of a SierpinskiMesh:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-o7aweo

Individual cells can be highlighted using their cell index:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-ca7yws


https://wolfram.com/xid/0d4h9ljuyi5u9mty-h8b5ha

Applications (1)Sample problems that can be solved with this function
SierpinskiMesh is generated from a triangle by repeatedly removing the middle triangle of the cells:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-rvdhi


https://wolfram.com/xid/0d4h9ljuyi5u9mty-12xkzg

Properties & Relations (5)Properties of the function, and connections to other functions
The output of SierpinskiMesh is always a full-dimensional MeshRegion:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-ghy46g


https://wolfram.com/xid/0d4h9ljuyi5u9mty-gzo2mh

SierpinskiMesh consists of triangles in 2D:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-cvwv09


https://wolfram.com/xid/0d4h9ljuyi5u9mty-gwk1z


https://wolfram.com/xid/0d4h9ljuyi5u9mty-hb84fz


https://wolfram.com/xid/0d4h9ljuyi5u9mty-fnic5d

Find the volume of the Sierpiński mesh in 3D at each stage:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-eq7cn0


https://wolfram.com/xid/0d4h9ljuyi5u9mty-bpi11n

Find the boundary mesh region of SierpinskiMesh:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-nk00k


https://wolfram.com/xid/0d4h9ljuyi5u9mty-hxrdsa

DataRangerange is equivalent to using RescalingTransform[{…},range]:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-ld8c8x

Use RescalingTransform:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-fnvf06

https://wolfram.com/xid/0d4h9ljuyi5u9mty-cu6dma

Possible Issues (1)Common pitfalls and unexpected behavior
SierpinskiMesh can be too large to generate:

https://wolfram.com/xid/0d4h9ljuyi5u9mty-tihoda


Wolfram Research (2017), SierpinskiMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/SierpinskiMesh.html.
Text
Wolfram Research (2017), SierpinskiMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/SierpinskiMesh.html.
Wolfram Research (2017), SierpinskiMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/SierpinskiMesh.html.
CMS
Wolfram Language. 2017. "SierpinskiMesh." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SierpinskiMesh.html.
Wolfram Language. 2017. "SierpinskiMesh." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SierpinskiMesh.html.
APA
Wolfram Language. (2017). SierpinskiMesh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SierpinskiMesh.html
Wolfram Language. (2017). SierpinskiMesh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SierpinskiMesh.html
BibTeX
@misc{reference.wolfram_2025_sierpinskimesh, author="Wolfram Research", title="{SierpinskiMesh}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/SierpinskiMesh.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_sierpinskimesh, organization={Wolfram Research}, title={SierpinskiMesh}, year={2017}, url={https://reference.wolfram.com/language/ref/SierpinskiMesh.html}, note=[Accessed: 29-March-2025
]}