CantorMesh

CantorMesh[n]

gives a mesh region representing the n^(th)-step Cantor set.

CantorMesh[n,d]

gives the n^(th)-step Cantor set in dimension d.

Details and Options

Examples

open allclose all

Basic Examples  (2)

A 1D Cantor mesh:

Lengths of the approximations to the Cantor mesh:

The formula:

A 2D Cantor mesh:

A 3D Cantor mesh:

Scope  (4)

A 1D Cantor mesh:

A 2D Cantor mesh:

A 3D Cantor mesh:

The ^(th) approximation to the Cantor set:

Options  (13)

DataRange  (1)

DataRange allows you to specify the range of mesh coordinates to generate:

Specify a different range:

MeshCellHighlight  (2)

MeshCellHighlight allows you to specify highlighting for parts of a CantorMesh:

Individual cells can be highlighted using their cell index:

Or by the cell itself:

MeshCellLabel  (2)

MeshCellLabel can be used to label parts of a CantorMesh:

Individual cells can be labeled using their cell index:

Or by the cell itself:

MeshCellMarker  (1)

MeshCellMarker can be used to assign values to parts of a CantorMesh:

Use MeshCellLabel to show the markers:

MeshCellShapeFunction  (2)

MeshCellShapeFunction can be used to assign values to parts of a CantorMesh:

Individual cells can be drawn using their cell index:

Or by the cell itself:

MeshCellStyle  (3)

MeshCellStyle allows you to specify styling for parts of a CantorMesh:

Individual cells can be highlighted using their cell index:

Or by the cell itself:

Give explicit color directives to specify colors for individual cells:

PlotTheme  (2)

Use a theme with grid lines and a legend:

Use a theme to draw a wireframe:

Applications  (4)

The Cantor set is generated from the unit interval by repeatedly removing the middle third of the cells:

In 2D:

In 3D:

Find the length of the Cantor mesh:

The general formula:

Find the measure of the 2D Cantor mesh:

The general formula:

Find the measure of the 3D Cantor mesh:

The general formula:

Properties & Relations  (4)

The output of CantorMesh is always a full-dimensional MeshRegion:

CantorMesh consists of intervals in 1D:

Rectangles in 2D:

Hexahedrons in 3D:

The total length removed of the Cantor set is 1:

Guess the general formula:

DataRange->range is equivalent to using RescalingTransform[{},range]:

Use RescalingTransform:

Possible Issues  (1)

CantorMesh can be too large to generate:

Introduced in 2017
 (11.1)