# PeanoCurve

PeanoCurve[n]

gives the line segments representing the n-step Peano curve.

# Details and Options

• PeanoCurve is also known as Peano space-filling curve.
• PeanoCurve returns a Line primitive corresponding to a path that starts at {0,0}, then joins all integer points in the 3n-1 by 3n-1 square, and ends at {3n-1,3n-1}. »
• PeanoCurve takes a DataRange option that can be used to specify the range the coordinates should be assumed to occupy.

# Examples

open allclose all

## Basic Examples(2)

A 2D Peano curve:

Lengths of the approximations to the Peano curve:

The formula:

Visualize the Peano curve in 2D with splines:

## Scope(6)

### Curve Specification(2)

A 2D Peano curve:

The n approximation of the Peano curve:

### Curve Styling(4)

Peano curves with different thicknesses:

Thickness in scaled size:

Thickness in printer's points:

Dashed curves:

Colored curves:

## Options(1)

### DataRange(1)

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

Specify a different range:

## Applications(4)

PeanoCurve is constructed recursively by transforming segments into curves linked together by lines:

Next iteration:

Visualize the Peano curve in 2D:

With splines:

Build a simple polygon:

Apply a Peano curve texture to a surface:

## Properties & Relations(3)

PeanoCurve consists of lines:

Find the perimeter of the 2D Peano curve:

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

## Possible Issues(2)

By default, the coordinates of a Peano curve are not in the unit square:

Using to generate a Peano curve in the unit square:

PeanoCurve can be too large to generate:

## Neat Examples(1)

Traversal animations:

Wolfram Research (2017), PeanoCurve, Wolfram Language function, https://reference.wolfram.com/language/ref/PeanoCurve.html.

#### Text

Wolfram Research (2017), PeanoCurve, Wolfram Language function, https://reference.wolfram.com/language/ref/PeanoCurve.html.

#### CMS

Wolfram Language. 2017. "PeanoCurve." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PeanoCurve.html.

#### APA

Wolfram Language. (2017). PeanoCurve. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PeanoCurve.html

#### BibTeX

@misc{reference.wolfram_2024_peanocurve, author="Wolfram Research", title="{PeanoCurve}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/PeanoCurve.html}", note=[Accessed: 20-July-2024 ]}

#### BibLaTeX

@online{reference.wolfram_2024_peanocurve, organization={Wolfram Research}, title={PeanoCurve}, year={2017}, url={https://reference.wolfram.com/language/ref/PeanoCurve.html}, note=[Accessed: 20-July-2024 ]}