Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jokergoo/sfcurve
2x2, 3x3 and nxn Space-Filling Curves
https://github.com/jokergoo/sfcurve
Last synced: 24 days ago
JSON representation
2x2, 3x3 and nxn Space-Filling Curves
- Host: GitHub
- URL: https://github.com/jokergoo/sfcurve
- Owner: jokergoo
- License: other
- Created: 2024-07-04T14:52:33.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-09-17T10:24:33.000Z (about 2 months ago)
- Last Synced: 2024-09-19T16:40:14.026Z (about 2 months ago)
- Language: R
- Homepage: https://jokergoo.github.io/sfcurve/
- Size: 50.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: docs/readme.html
- Changelog: NEWS
- License: LICENSE
Awesome Lists containing this project
README
sfcurve: 2x2, 3x3 and nxn Space-Filling Curves • sfcurve
Skip to contents
This package provides a way to encode all possible forms of 2x2 and 3x3 space-filling curves. For example, the following eight forms correspond to the 2x2 curve on level 3 and with
R(0)
(bottom-in right-out base pattern with rotation of 0 degree) as the seed.
It also supports nxn curves expanded from any valid level-1 unit.
Usage
Hilbert curve (2x2):
> sfc_2x2("I", "111")
An sfc_2x2 object.
Increase mode: 2 x 2
Level: 3
Expansion rule: 2x2A sequence of 64 base patterns.
R(0)L(270)L(0)R(90) I(0)R(0)R(270)L(180)
L(270)R(0)R(270)I(180) R(180)L(90)L(180)I(270)
.... other 4 lines ....
I(90)L(90)L(180)R(270) I(180)R(180)R(90)L(0)
L(90)R(180)R(90)I(0) R(0)L(270)L(0)R(90)Seed: A sequence of 1 base pattern.
I(0)Peano curve (3x3):
> sfc_3x3_peano("I", "111")
An sfc_3x3_peano object.
Increase mode: 3 x 3
Level: 3
Expansion rule: 3x3 PeanoA sequence of 729 base patterns.
I(0)J(0)R(0)R(270) I(180)L(180)L(270)J(0)
I(0)J(0)I(0)L(0) L(90)J(180)R(180)R(90)
.... other 88 lines ....
I(0)J(0)R(0)R(270) I(180)L(180)L(270)J(0)
I(0)Seed: A sequence of 1 base pattern.
I(0)Meander curve (3x3):
> sfc_3x3_meander("I", "111")
An sfc_3x3_meander object.
Increase mode: 3 x 3
Level: 3
Expansion rule: 3x3 MeanderA sequence of 729 base patterns.
R(0)I(270)L(270)I(0) L(0)L(90)R(180)R(90)
I(0)R(0)I(270)L(270) I(0)L(0)L(90)R(180)
.... other 88 lines ....
R(0)I(270)L(270)I(0) L(0)L(90)R(180)R(90)
I(0)Seed: A sequence of 1 base pattern.
I(0)It also allows using a sequence as the seed:
p = sfc_seed("LLLILILIILIILIIILIIILIIII")
p2 = sfc_2x2(p, "1111")
plot(p2)
For more comprehensive introduction of the theory and the package, please refer to the vignettes.
On this page