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:

Lengths of the approximations to the Koch mesh:

The formula:

The first four iterations of the Koch snowflake:

Scope  (7)

Curve Specification  (3)

A 2D Koch curve:

The n^(th) approximation of the Koch curve:

Specify the length of the relative angles:

Curve Styling  (4)

Koch 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)

KochCurve is generated by repeatedly removing the middle third of the cells and replacing it with a triangle:

Generate Cesàro fractal:

Quadratic type 1 curve:

Quadratic type 2 curve:

Properties & Relations  (3)

KochCurve consists of lines:

AnglePath can be used to generate the first iteration of the Koch curve:

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

Use RescalingTransform:

Neat Examples  (1)

Koch snowflake in animation:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_kochcurve, organization={Wolfram Research}, title={KochCurve}, year={2017}, url={https://reference.wolfram.com/language/ref/KochCurve.html}, note=[Accessed: 23-April-2024 ]}