Description Usage Arguments Value References Examples
Koch
plots the first iterations of Koch curve, a well-known fractal
1 | Koch(P1, P2, it)
|
P1 |
Vector containing the xy-coordinates of point 1. This point is the left extreme of the segment that corresponds to the first iteration ( |
P2 |
Vector containing the xy-coordinates of point 2. This point is the right extreme of the segment that corresponds to the first iteration ( |
it |
Number of iterations to be performed for the construction of Koch curve. It is not recommended to choose a number higher than 7 in order to avoid an excess of computation |
None. It produces the plot of the first n
iterations of Koch curve in the current coordinate plane
http://mathworld.wolfram.com/KochSnowflake.html
1 2 3 4 5 6 7 8 9 | x_min <- -6
x_max <- 6
y_min <- -4
y_max <- 8
CoordinatePlane(x_min, x_max, y_min, y_max)
P1 <- c(-5,0)
P2 <- c(5,0)
it <- 4
Koch(P1, P2, it)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.