sfc_expand,sfc_2x2-method {sfcurve} | R Documentation |
Expand the curve to the next level
Description
Expand the curve to the next level
Usage
## S4 method for signature 'sfc_2x2'
sfc_expand(p, code, flip = FALSE)
## S4 method for signature 'sfc_3x3_peano'
sfc_expand(p, code = 1, flip = FALSE)
## S4 method for signature 'sfc_3x3_meander'
sfc_expand(p, code, flip = FALSE)
Arguments
p |
An |
code |
Expansion code, a single integer. |
flip |
Whethe to flip level-1 units? The value should be a logical vector of length one or the same as the length of |
Details
For the Hilbert curve and Meander curve, as long as the expansion code of the first base pattern in the sequence is determinted,
the expansion codes for other base patterns in the sequence are all determined. For the Peano curve, since
there is only one traverse path on any level, code
is ignored.
These functions are mainly used internally.
Value
An object in the same class as the input.
Examples
p = sfc_2x2("I", 11)
sfc_expand(p, 2) # I|211
p = sfc_3x3_peano("I", 11)
sfc_expand(p, 2) # I|211
p = sfc_3x3_meander("I", 11)
sfc_expand(p, 2) # I|211
[Package sfcurve version 1.0.0 Index]