View source: R/sfc_4x4_meander.R
sfc_4x4_meander | R Documentation |
4x4 space-filling curves in meander type
sfc_4x4_meander(seed, code = integer(0), rot = 0L, flip = FALSE, type = 1L)
## S4 method for signature 'sfc_4x4_meander'
sfc_expand(p, code, flip = FALSE)
draw_rules_4x4_meander(type = 1, flip = FALSE)
seed |
The seed sequence. In most cases, the seed sequence is a single base pattern, which can be specified as a single letter, then |
code |
A vector of the expansion code. The left side corresponds to the higher levels (more to the top-level) of the curve and the right side corresponds to the lower level (more to the bottom-level) of the curve.
The value can be set as a vector e.g. |
rot |
Rotation of the seed sequence, measured in the polar coordinate system, in degrees. |
flip |
The same setting as in |
type |
Which type of rules to use? 1 for |
p |
An |
It is an extension of the 3x3 Meander curves to mode 4. For simplicity, it only supports I/R/L
base patterns.
sfc_4x4_meander()
returns an sfc_4x4_meander
object.
draw_multiple_curves(
sfc_4x4_meander("I", "11", type = 1),
sfc_4x4_meander("I", "12", type = 1),
sfc_4x4_meander("I", "11", type = 2),
sfc_4x4_meander("I", "12", type = 2),
nrow = 2
)
seed = paste(rep(paste0("R", sapply(0:10, function(i) strrep("I", i))), each = 2), collapse="")
sfc_4x4_meander(seed, 1) |> plot()
draw_rules_4x4_meander(type = 1)
draw_rules_4x4_meander(type = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.