draw_multiple_curves(
sfc_h(H0, iteration = 2),
sfc_h(H2, iteration = 2),
closed = TRUE, nrow =1
)
draw_multiple_curves(
sfc_h(H1, iteration = 3, random = TRUE),
sfc_h(H1, iteration = 3, random = TRUE),
closed = TRUE, nrow = 1
)
draw_multiple_curves(
expand_h(H0, connect = "hvvh"),
expand_h(H1, connect = "vvhh"),
closed = TRUE, nrow = 1
)
# set the four subunits separately
h1 = expand_h(H0, connect = "hhhh")
h2 = expand_h(H0, connect = "vvvv")
h3 = expand_h(H0, connect = "hvhv")
h4 = expand_h(H0, connect = "hvvh")
expand_h(h1, h2, h3, h4, connect = "vhvh") |>
plot_segments(closed = TRUE)
fun = function(h, iteration) {
for(i in 1:iteration) h = expand_h(h, connect = "vhvh")
h
}
fun(H0, 4) |> plot_segments(closed = TRUE)
Run the code above in your browser using DataLab