KochCurve

KochCurve[n]

gives the line segments representing the n^(th)-step Koch curve.

KochCurve[n,{θ1,θ2,}]

takes a series of steps of unit length at successive relative angles θi.

KochCurve[n,{{r1,θ1},{r2,θ2},}]

takes successive steps of lengths proportional to ri.

Details and Options

  • KochCurve is also known as Koch snowflake.
  • KochCurve[n] is generated from the unit interval by repeatedly removing the middle third of the subsequent cells and replacing it with a triangle. »
  • KochCurve[n] is equivalent to KochCurve[n,{0,60 °,-120 °,60 °}].
  • KochCurve 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 Koch curve:

In[1]:=
Click for copyable input
Out[1]=

Lengths of the approximations to the Koch mesh:

In[2]:=
Click for copyable input
Out[2]=

The formula:

In[3]:=
Click for copyable input
Out[3]=

Visualize the Koch curve in 2D with splines:

In[1]:=
Click for copyable input
Out[1]=

Scope  (7)

Options  (1)

Applications  (4)

Properties & Relations  (3)

See Also

AnglePath  HilbertCurve  PeanoCurve  SierpinskiCurve

Introduced in 2017
(11.1)