Math::...Centres(3pm)
π NAME π
Math::PlanePath::DekkingCentres β bestie it's a 5x5 self-similar situation and we're obsessed π
(this one lives in the Math::...Centres(3pm) slot, iykyk)
β¨ SYNOPSIS β¨
use Math::PlanePath::DekkingCentres;
my $path = Math::PlanePath::DekkingCentres->new;
my ($x, $y) = $path->n_to_xy (123);
like, that's it. that's the whole vibe check. π¦
π DESCRIPTION π
okay so this is a lil variation on a 5x5 self-similar curve, and the source material is, and I quote:
F. M. Dekking, "Recurrent Sets", Advances in Mathematics, volume 44, 1982, pages 79-104, section 4.9 "Gosper-Type Curves"
and ngl it's also a horizontal mirror image of the E-curve of McKenna 1978. iconic lineage fr fr.
The way this one works: it visits the "centres" of the 5x5 self-similar unit squares of the pattern. The result is some diagonal steps, but the replications stay wholly within 5x5 areas. no cap.
...
| /
9 | 115-116 122-123-124 89--88 86--85--84
| | | \ | \ | |
8 | 114 117-118 121-120 90 92 87 82--83
| | \ / |/ \ |
7 | 113-112 106 119 102 91 94--93 81 77
| / / | / | / / / |
6 | 111 107 105 103 101 95--96 80 78 76
| | \ \ | | \ \ | |
5 | 110-109-108 104 100--99--98--97 79 75
| \
4 | 10--11 13--14--15 35--36 38--39--40 74 70 66--65--64
| | \ | | | \ | | | |\ \ |
3 | 9 7 12 17--16 34 32 37 42--41 73 71 69 67 63
| |/ \ | |/ \ | |/ |/ /
2 | 8 5-- 6 18 22 33 30--31 43 47 72 55 68 62--61
| / / / | / / / | / \ |
1 | 4-- 3 19 21 23 29--28 44 46 48 54--53 56--57 60
| \ \ | | \ \ | | \ | |
Y=0 | 0-- 1-- 2 20 24--25--26--27 45 49--50--51--52 58--59
+---------------------------------------------------------------
X=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
The base pattern is the N=0 to N=24 section, okay? It repeats with rotations or reversals which make the ends join β the little puzzle pieces just snap together. For example:
N=75toN=99is the base pattern in reverse πN=50toN=74is reverse and also rotate by -90
π₯ FUNCTIONS π₯
See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path classes β that's the shared lore, bestie π
$path = Math::PlanePath::DekkingCentres->new ()β makes you a brand new path object and hands it back to you. main character energy, freshly minted β¨($x,$y) = $path->n_to_xy ($n)β gimme the X,Y coordinates of point number$non the path. Points begin at 0, and if$n < 0then the return is an empty list (it's giving nothing, literally) π
π¦ Level Methods π¦
($n_lo, $n_hi) = $path->level_to_n_range($level)β returns(0, 25**$level - 1). that's the range, slay.
π SEE ALSO π
Math::PlanePathMath::PlanePath::DekkingCurveMath::PlanePath::CincoCurveMath::PlanePath::PeanoCurve
π HOME PAGE π
<http://user42.tuxfamily.org/math-planepath/index.html>
π LICENSE π
Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Kevin Ryde
This file is part of Math-PlanePath.
Math-PlanePath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. periodt π
Math-PlanePath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Math-PlanePath. If not, see <http://www.gnu.org/licenses/>.
bestie if you didn't get the license copy, go get it, that's not optional π
okay that's the whole page, mwah π«Ά this was perl v5.32.0, dated 2021-01-23, filed under Math::...Centres(3pm) β go build a curve, you've got this πβ¨πΈ
π¦ where this page comes from
- debian bookworm: libmath-planepath-perl 129-1 Β· GPL-3.0-or-later
- debian trixie: libmath-planepath-perl 129-1 Β· GPL-3.0-or-later
- ubuntu jammy: libmath-planepath-perl 129-1 Β· GPL-3.0-or-later
- ubuntu noble: libmath-planepath-perl 129-1 Β· GPL-3.0-or-later
- ubuntu resolute: libmath-planepath-perl 129-1 Β· GPL-3.0-or-later
- ubuntu stonking: libmath-planepath-perl 129-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms