sfc_reduce,sfc_nxn-method | R Documentation |
Reduce a curve
## S4 method for signature 'sfc_nxn'
sfc_reduce(p, to = sfc_level(p) - 1)
## S4 method for signature 'matrix'
sfc_reduce(p, to = level - 1, mode = NULL)
add_base_structure(gb, level = 1)
p |
An |
to |
Which level to reduce to? Value should be between 1 and |
mode |
Mode of the curve. |
gb |
A |
level |
The level of the unit. |
The reduction is applied on the coordinates of points.
add_base_structure()
adds a base structure on a certain level to the curve.
A two-column matrix of coordinates of the reduced curve.
p = sfc_3x3_peano("I", level = 3)
draw_multiple_curves(
p,
sfc_reduce(p, 2),
sfc_reduce(p, 1),
nrow = 1)
p = hilbert_curve(level = 4)
draw_multiple_curves(
p,
sfc_reduce(p, 3),
sfc_reduce(p, 2),
nrow = 1)
p = hilbert_curve(3)
draw_multiple_curves(
add_base_structure(p, level = 1),
add_base_structure(p, level = 2),
nrow = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.