Package: sfcurve 1.0.1

Zuguang Gu

sfcurve: 2x2, 3x3 and Nxn Space-Filling Curves

Implementation of all possible forms of 2x2 and 3x3 space-filling curves, i.e., the generalized forms of the Hilbert curve <https://en.wikipedia.org/wiki/Hilbert_curve>, the Peano curve <https://en.wikipedia.org/wiki/Peano_curve> and the Peano curve in the meander type (Figure 5 in <https://eudml.org/doc/141086>). It can generates nxn curves expanded from any specific level-1 units. It also implements the H-curve and the three-dimensional Hilbert curve.

Authors:Zuguang Gu [aut, cre]

sfcurve_1.0.1.tar.gz
sfcurve_1.0.1.zip(r-4.5)sfcurve_1.0.1.zip(r-4.4)sfcurve_1.0.1.zip(r-4.3)
sfcurve_1.0.1.tgz(r-4.4-x86_64)sfcurve_1.0.1.tgz(r-4.4-arm64)sfcurve_1.0.1.tgz(r-4.3-x86_64)sfcurve_1.0.1.tgz(r-4.3-arm64)
sfcurve_1.0.1.tar.gz(r-4.5-noble)sfcurve_1.0.1.tar.gz(r-4.4-noble)
sfcurve_1.0.1.tgz(r-4.4-emscripten)sfcurve_1.0.1.tgz(r-4.3-emscripten)
sfcurve.pdf |sfcurve.html
sfcurve/json (API)
NEWS

# Install 'sfcurve' in R:
install.packages('sfcurve', repos = c('https://jokergoo.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/jokergoo/sfcurve/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

81 exports 1 stars 1.32 score 3 dependencies 13 scripts 38 downloads

Last updated 1 days agofrom:18cae425ea. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 17 2024
R-4.5-win-x86_64OKSep 17 2024
R-4.5-linux-x86_64OKSep 17 2024
R-4.4-win-x86_64OKSep 17 2024
R-4.4-mac-x86_64OKSep 17 2024
R-4.4-mac-aarch64OKSep 17 2024
R-4.3-win-x86_64OKSep 17 2024
R-4.3-mac-x86_64OKSep 17 2024
R-4.3-mac-aarch64OKSep 17 2024

Exports:add_base_structureall_2x2_shapesall_3x3_meander_shapesall_3x3_peano_shapesall_traverse_pathsBASE_BBASE_CBASE_DBASE_IBASE_JBASE_LBASE_LISTBASE_PBASE_QBASE_RBASE_Ubeta_omega_curvechange_level1_unit_orientationdraw_multiple_curvesdraw_rules_2x2draw_rules_3x3_combineddraw_rules_3x3_meanderdraw_rules_3x3_peanodraw_rules_4x4_meanderexpand_hget_one_traverse_pathh_curveH0H1H2hilbert_3dhilbert_curvelevel1_unit_orientationmark_local_unitsmeander_curvemoore_curvepeano_curveplot_segmentsplot_traverse_pathssfc_2x2sfc_3x3_combinedsfc_3x3_meandersfc_3x3_peanosfc_4x4_meandersfc_applysfc_basesfc_dflipsfc_expandsfc_expand_by_rulessfc_flip_unitsfc_generatorsfc_grobsfc_hsfc_hflipsfc_indexsfc_is_compatiblesfc_levelsfc_modesfc_next_pointsfc_previous_pointsfc_reducesfc_reversesfc_rotatesfc_rulesSFC_RULES_2x2SFC_RULES_3x3_COMBINEDSFC_RULES_3x3_MEANDERSFC_RULES_3x3_PEANOSFC_RULES_4x4_MEANDER_1SFC_RULES_4x4_MEANDER_2sfc_seedsfc_segmentssfc_sequencesfc_shapesfc_unitsfc_universesfc_validatesfc_vflipshowtest_sfc_indexunit_orientation

Dependencies:colorRamp2colorspaceRcpp

The sfcurve package

Rendered fromsfcurve.Rmdusingknitr::rmarkdownon Sep 17 2024.

Last update: 2024-08-02
Started: 2024-07-18

Readme and manuals

Help Manual

Help pageTopics
Subunit in the curvesfc_index sfc_index,sfc_nxn-method test_sfc_index [.sfc_nxn
Utility functionsc.sfc_sequence length.sfc_sequence [.sfc_sequence [<-.sfc_sequence
All traverse paths of a sequenceall_traverse_paths get_one_traverse_path plot_traverse_paths
Base patternsBASE_B BASE_C BASE_D BASE_I BASE_J BASE_L BASE_LIST BASE_P BASE_Q BASE_R BASE_U
Draw multiple curvesdraw_multiple_curves
Draw the expansion rulesdraw_rules_2x2 draw_rules_3x3_meander draw_rules_3x3_peano
Seed sequences of the H-curveH0 H1 H2
Three dimensional Hilbert curvehilbert_3d
Various curves in their standard formsbeta_omega_curve hilbert_curve h_curve meander_curve moore_curve peano_curve
Level-1 unit in the Peano curve and Meander curvechange_level1_unit_orientation change_level1_unit_orientation,sfc_3x3_meander-method change_level1_unit_orientation,sfc_3x3_peano-method level1_unit_orientation level1_unit_orientation,sfc_3x3_meander-method level1_unit_orientation,sfc_3x3_peano-method
Plot segmentsplot_segments
Create space-filling curvessfc_2x2 sfc_3x3_meander sfc_3x3_peano
General 3x3 space-filling curvesdraw_rules_3x3_combined sfc_3x3_combined sfc_expand,sfc_3x3_combined-method
4x4 space-filling curves in meander typedraw_rules_4x4_meander sfc_4x4_meander sfc_expand,sfc_4x4_meander-method
Apply to every unit in the sfc_nxn curvesfc_apply sfc_apply,sfc_nxn-method
Constructor of the sfc_base classsfc_base
Expand a sequencesfc_expand_by_rules sfc_expand_by_rules,sfc_rules,character-method sfc_expand_by_rules,sfc_rules,factor-method sfc_expand_by_rules,sfc_rules,sfc_nxn-method
Expand the curve to the next levelsfc_expand sfc_expand,sfc_2x2-method sfc_expand,sfc_3x3_meander-method sfc_expand,sfc_3x3_peano-method |.sfc_nxn
Generate a nxn curve based on expansion rulessfc_generator
The graphics objectplot.grob_sfc_sequence plot.sfc_nxn plot.sfc_sequence sfc_grob sfc_grob,matrix-method sfc_grob,sfc_base-method sfc_grob,sfc_nxn-method sfc_grob,sfc_sequence-method
H-curveexpand_h sfc_h
Whether two sfc_sequence objects are compatiblesfc_is_compatible sfc_is_compatible,sfc_rules,sfc_sequence-method sfc_is_compatible,sfc_sequence,sfc_rules-method sfc_is_compatible,sfc_sequence,sfc_sequence-method
The level of the curvesfc_level sfc_level,sfc_nxn-method
The mode of the curvesfc_mode sfc_mode,sfc_nxn-method sfc_mode,sfc_rules-method
The previous and the next pointsfc_next_point sfc_next_point,sfc_base-method sfc_previous_point sfc_previous_point,sfc_base-method
Reduce a curveadd_base_structure mark_local_units sfc_reduce sfc_reduce,matrix-method sfc_reduce,sfc_nxn-method
Transformations of a sequencerev.sfc_sequence sfc_dflip sfc_dflip,sfc_sequence-method sfc_hflip sfc_hflip,sfc_sequence-method sfc_reverse sfc_reverse,sfc_sequence-method sfc_rotate sfc_rotate,sfc_sequence-method sfc_vflip sfc_vflip,sfc_sequence-method ^.sfc_sequence
Constructor of the sfc_rules classsfc_rules
RulesSFC_RULES_2x2 SFC_RULES_3x3_COMBINED SFC_RULES_3x3_MEANDER SFC_RULES_3x3_PEANO SFC_RULES_4x4_MEANDER_1 SFC_RULES_4x4_MEANDER_2
Coordinates of the points on the curvesfc_segments sfc_segments,sfc_nxn-method sfc_segments,sfc_sequence-method
Constructor of the sfc_sequence classsfc_seed sfc_sequence sfc_unit
Shape of the curveall_2x2_shapes all_3x3_meander_shapes all_3x3_peano_shapes sfc_shape sfc_shape,sfc_2x2-method sfc_shape,sfc_3x3_meander-method sfc_shape,sfc_3x3_peano-method
The universe base pattern setsfc_universe sfc_universe,sfc_rules-method sfc_universe,sfc_sequence-method
Validate the sequencesfc_validate sfc_validate,character-method sfc_validate,sfc_sequence-method
Print the objectshow,sfc_base-method show,sfc_nxn-method show,sfc_rules-method show,sfc_sequence-method
Flip unitssfc_flip_unit sfc_flip_unit,sfc_nxn-method sfc_flip_unit,sfc_unit-method unit_orientation