Description Usage Arguments Value References Examples
Sierpinski
plots the first iterations of Sierpinski triangle, a well-known fractal
1 | Sierpinski(Tri, it)
|
Tri |
Regular triangle, previously created with function |
it |
Number of iterations to be performed for the construction of Sierpinski triangle. It is not recommended to choose a number higher than 10 in order to avoid an excess of computation |
None. It produces the plot of the first n
iterations of Sierpinski triangle in the current coordinate plane
http://mathworld.wolfram.com/SierpinskiSieve.html
1 2 3 4 5 6 7 8 9 10 11 | x_min <- -6
x_max <- 6
y_min <- -6
y_max <- 6
CoordinatePlane(x_min, x_max, y_min, y_max)
n <- 3
C <- c(0,0)
l <- 5
Tri <- CreateRegularPolygon(n, C, l)
it <- 6
Sierpinski(Tri, it)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.