Function Repository Resource:

# LevyCCurve

Generate the Lévy C curve

Contributed by: Sander Huisman
 ResourceFunction["LevyCCurve"][n] generates the line segments of the Lévy C curve with n iterations. ResourceFunction["LevyCCurve"][{p1,p2},n] uses the line connecting the points p1 and p2 as the initial line. ResourceFunction["LevyCCurve"][{p1,p2,… ,pn},n] uses the lines joining the points pi.

## Details

The following transformation is done with each line segment:
The first four iterations and the ninth iteration:
ResourceFunction["LevyCCurve"][n] is equivalent to ResourceFunction["LevyCCurve"][{{-1,0},{1,0}},n].
The syntax ResourceFunction["LevyCCurve"][Line[{p1,p2, ,pn}],n] is also supported.

## Examples

### Basic Examples (2)

Generate the Lévy C curve for four iterations:

 In[1]:=
 Out[1]=

Generate the line for eight iterations and visualize the result:

 In[2]:=
 Out[2]=

### Scope (1)

Start from a vertical line segment:

 In[3]:=
 Out[3]=

### Properties and Relations (1)

The length of the Lévy C curve grows approximately exponentially:

 In[4]:=
 Out[4]=

### Neat Examples (2)

"Inward" and "outward" Lévy C curve starting from a square:

 In[5]:=
 Out[5]=

Color the curve along its length:

 In[6]:=
 Out[6]=

SHuisman

## Version History

• 1.0.0 – 22 October 2021

## Author Notes

Code used for images in the Details and Option section:

 In[1]:=
 In[2]:=