NAME
Math::PlanePath::DekkingCurve  5x5 selfsimilar edge curve
SYNOPSIS
use Math::PlanePath::DekkingCurve;
my $path = Math::PlanePath::DekkingCurve>new;
my ($x, $y) = $path>n_to_xy (123);
DESCRIPTION
This is an integer version of a 5x5 selfsimilar curve by Dekking,
10  123124125... 8685
   
9  115116117 122121 90898887 84
     
8  114113 118119120 919293 8283
   
7  112 107106 103102 9594 81 7877
         
6  111 108 105104 101 9697 8079 76
     
5  110109 1415 1009998 3940 75 6665
       
4  10111213 16 35363738 41 74 7170 67 64
         
3  987 1817 343332 4342 7372 6968 63
     
2  56 19 2223 3031 44 4748 555657 6261
           
1  43 2021 24 2928 4546 49 5453 585960
     
Y=0  012 252627 505152
+
X=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
The base pattern is the N=0 to N=25 section. It then repeats with rotations or reversals which make the ends join. For example N=75 to N=100 is the base pattern in reverse, ie. from N=25 down to N=0. Or N=50 to N=75 is reverse and also rotate by 90.
The curve segments are edges of squares in a 5x5 arrangement.
+  +  +  1415 +
    v > 
^ ^ < 
10111213  16 +
 v > 
> ^ ^ 
987  1817 +
v   > 
 ^ >  ^
+  56  19 2223
 <  <
 < ^  < 
+  43 2021  24
 v <
^ ^ >   
012  +  + 25
The little notch marks show which square each edge represents. This is the side the curve expands into at the next level. For example N=1 to N=2 has its notch on the left so the next level N=25 to N=50 expands on the left.
An expansion on the left is a repeat of the base shape, possibly rotated 90, 180 or 270 degrees. An expansion on the right is the base shape in reverse, as for example N=2 to N=3 on the right becomes N=50 to N=75 traversing to the right at the next level.
FUNCTIONS
See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path classes.
$path = Math::PlanePath::DekkingCurve>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::DekkingCentres, Math::PlanePath::CincoCurve, Math::PlanePath::PeanoCurve
HOME PAGE
http://user42.tuxfamily.org/mathplanepath/index.html
LICENSE
Copyright 2011, 2012, 2013, 2014 Kevin Ryde
This file is part of MathPlanePath.
MathPlanePath 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.
MathPlanePath 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 MathPlanePath. If not, see <http://www.gnu.org/licenses/>.