NAME
Math::PlanePath::DekkingStraight -- 5x5 self-similar
SYNOPSIS
use Math::PlanePath::DekkingStraight;
my $path = Math::PlanePath::DekkingStraight->new;
my ($x, $y) = $path->n_to_xy (123);
DESCRIPTION
This is an integer version of a 5x5 self-similar curve by Dekking,
14 135-136 138-139-140 174 170 166-165-164
| \ | | | |\ \ |
13 134 132 137 142-141 173 171 169 167 163
|/ \ | |/ |/ /
12 133 130-131 143 147 172 155 168 162-161
/ / / | / \ |
11 129-128 144 146 148 154-153 156-157 160
\ \ | | \ | |
10 125-126-127 145 149-150-151-152 158-159
/
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. It then repeats with rotations or reversals that make the ends join. For example N=75 to N=99 is the base pattern in reverse. Or N=50 to N=74 is reverse and also rotate by -90.
FUNCTIONS
See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path classes.
$path = Math::PlanePath::DekkingStraight->new ()
-
Create and return a new path object.
($x,$y) = $path->n_to_xy ($n)
-
Return the X,Y coordinates of point number
$n
on the path. Points begin at 0 and if$n < 0
then the return is an empty list.
SEE ALSO
Math::PlanePath, Math::PlanePath::PeanoStraight
HOME PAGE
http://user42.tuxfamily.org/math-planepath/index.html
LICENSE
Copyright 2011, 2012 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.
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/>.