
Last chance! 50% off unlimited learning
Sale ends in
Tessellation
creates a geometric pattern by the repetitive translation of an initial geometric object
Tessellation(objects_list, colors, direction, separation, it)
A list composed by several geometric objects (mainly polygons created with CreatePolygon
or CreateRegularPolygon
)
Vector containing the colors for each of the objects of the initial geometric object
Vector containing the xy-coordinates of the direction in which tessellation is being generated
Number indicating the distance that separates any of the geometric objects in the repetitive pattern. This distance must be understood in the sense of a translation of the initial object. Indeed, this distance is only preserved in the direction of the chosen vector direction
when generating the pattern. Moreover, the choice of separation = 0
implies no pattern is generated
Number of iterations to be performed for the construction of the tessellation
None. It produces the plot of a repetitive pattern, usually known as a tessellation
http://mathworld.wolfram.com/Tessellation.html
# NOT RUN {
x_min <- -6
x_max <- 6
y_min <- -2
y_max <- 10
CoordinatePlane(x_min, x_max, y_min, y_max)
Hexa <- CreateRegularPolygon(6, c(-3,0), 1)
Draw(Hexa, "purple")
Tri <- CreatePolygon(c(-3,-1), c(Hexa[4,1],-2), c(Hexa[1,1],-2))
Draw(Tri,"pink")
objects_list <- list(Tri, Hexa)
cols <- c("pink", "purple")
direction <- c(1,0)
separation <- 1.732051
it <- 3
Tessellation(objects_list, cols, direction, separation, it)
direction <- c(0,1)
separation <- 3
it <- 4
Tessellation(objects_list, cols, direction, separation, it)
# }
Run the code above in your browser using DataLab