hilbert_curve | R Documentation |
Various curves in their standard forms
hilbert_curve(level = 2L, by = "Cpp")
moore_curve(level = 2L)
beta_omega_curve(level = 2L)
peano_curve(level = 2L, pattern = "vvvvvvvvv", by = "Cpp")
meander_curve(level = 2L, pattern = "fffffffff", code = rep(1, level))
h_curve(iteration = 2L)
level |
Level of the curve. |
by |
Which implementation? Only for the testing purpose. |
pattern |
The orientation of units on level-2, i.e. the orientation of the 9 3x3 units. The value should be a string with 9 letters of "v"/"h" (vertical or horizontal) for the Peano curve, and "f"/"b" (forward or backward) for the Meander curve. The length of the string should be maximal 9. If the length is smaller than 9, the stringis automatically recycled. |
code |
Internally used. |
iteration |
Number of iterations. |
These are just special forms of sfc_2x2()
, sfc_3x3_peano()
, sfc_3x3_meander()
and sfc_h()
.
A two-column matrix of coordinates of points on the curve.
hilbert_curve(2)
draw_multiple_curves(
hilbert_curve(3),
hilbert_curve(4),
nrow = 1
)
draw_multiple_curves(
moore_curve(3),
moore_curve(4),
nrow = 1
)
draw_multiple_curves(
beta_omega_curve(3),
beta_omega_curve(4),
nrow = 1
)
draw_multiple_curves(
peano_curve(2),
peano_curve(3),
nrow = 1
)
draw_multiple_curves(
peano_curve(3, pattern = "vh"),
peano_curve(3, pattern = "vvvhhhvvv"),
nrow = 1
)
draw_multiple_curves(
meander_curve(2),
meander_curve(3),
nrow = 1
)
draw_multiple_curves(
meander_curve(3, pattern = "fbfbfbfbf"),
meander_curve(3, pattern = "bbbbbffff"),
nrow = 1
)
draw_multiple_curves(
h_curve(1),
h_curve(2),
nrow = 1, closed = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.