1Math::PlanePath::WunderUlsiecrhMCeoanntdreirb(u3t)ed PerMlatDho:c:uPmleannteaPtaitohn::WunderlichMeander(3)
2
3
4

NAME

6       Math::PlanePath::WunderlichMeander -- 3x3 self-similar "R" shape
7

SYNOPSIS

9        use Math::PlanePath::WunderlichMeander;
10        my $path = Math::PlanePath::WunderlichMeander->new;
11        my ($x, $y) = $path->n_to_xy (123);
12

DESCRIPTION

14       This is an integer version of the 3x3 self-similar meander by Walter
15       Wunderlich,
16
17             8     20--21--22  29--30--31  38--39--40
18                    |       |   |       |   |       |
19             7     19  24--23  28  33--32  37  42--41
20                    |   |       |   |       |   |
21             6     18  25--26--27  34--35--36  43--44
22                    |                               |
23             5     17  14--13  56--55--54--53--52  45
24                    |   |   |   |               |   |
25             4     16--15  12  57  60--61  50--51  46
26                            |   |   |   |   |       |
27             3      9--10--11  58--59  62  49--48--47
28                    |                   |
29             2      8   5-- 4  65--64--63  74--75--76
30                    |   |   |   |           |       |
31             1      7-- 6   3  66  69--70  73  78--77
32                            |   |   |   |   |   |
33           Y=0->    0-- 1-- 2  67--68  71--72  79--80-...
34
35                   X=0  1   2   3   4   5   6   7   8
36
37       The base pattern is the N=0 to N=8 section.  It works as a traversal of
38       a 3x3 square going from one corner along one side.  The base figure
39       goes upwards and it's then used rotated by 180 degrees and/or
40       transposed to go in other directions,
41
42           +----------------+----------------+---------------+
43           | ^              |              * | ^             |
44           | |              |  rotate 180  | | |   base      |
45           | |     8        |       5      | | |     4       |
46           | |   base       |              | | |             |
47           | *              |              v | *             |
48           +----------------+----------------+---------------+
49           | <------------* | <------------* | ^             |
50           |                |                | |             |
51           |       7        |       6        | |     3       |
52           |   rotate 180   |   rotate 180   | |   base      |
53           |  + transpose   |  + transpose   | *             |
54           +----------------+----------------+---------------+
55           |                |                | ^             |
56           |                |                | |             |
57           |       0        |       1        | |     2       |
58           |   transpose    |   transpose    | |   base      |
59           | *----------->  | *------------> | *             |
60           +----------------+----------------+---------------+
61
62       The base 0 to 8 goes upwards, so the across sub-parts are an X,Y
63       transpose.  The transpose in the 0 part means the higher levels go
64       alternately up or across.  So N=0 to N=8 goes up, then the next level
65       N=0,9,18,.,72 goes right, then N=81,162,..,648 up again, etc.
66
67       Wunderlich's conception is successive lower levels of detail as a
68       space-filling curve and the transposing in that case applies to ever
69       smaller parts.  But for the integer version here the start direction is
70       fixed and the successively higher levels alternate.  The first move N=0
71       to N=1 is rightwards per the "Schema" shown in Wunderlich's paper (and
72       which is similar to the "PeanoCurve" and various other "PlanePath"
73       curves).
74

FUNCTIONS

76       See "FUNCTIONS" in Math::PlanePath for behaviour common to all path
77       classes.
78
79       "$path = Math::PlanePath::WunderlichMeander->new ()"
80           Create and return a new path object.
81
82       "($x,$y) = $path->n_to_xy ($n)"
83           Return the X,Y coordinates of point number $n on the path.  Points
84           begin at 0 and if "$n < 0" then the return is an empty list.
85
86       "($n_lo, $n_hi) = $path->rect_to_n_range ($x1,$y1, $x2,$y2)"
87           The returned range is exact, meaning $n_lo and $n_hi are the
88           smallest and biggest in the rectangle.
89
90   Level Methods
91       "($n_lo, $n_hi) = $path->level_to_n_range($level)"
92           Return "(0, 9**$level - 1)".
93

SEE ALSO

95       Math::PlanePath, Math::PlanePath::PeanoCurve
96
97       Walter Wunderlich "Uber Peano-Kurven", Elemente der Mathematik,
98       28(1):1-10, 1973.
99
100           <http://sodwana.uni-ak.ac.at/geom/mitarbeiter/wallner/wunderlich/>
101           <http://sodwana.uni-ak.ac.at/geom/mitarbeiter/wallner/wunderlich/pdf/125.pdf>
102           (scanned copy, in German)
103

HOME PAGE

105       <http://user42.tuxfamily.org/math-planepath/index.html>
106

LICENSE

108       Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 Kevin Ryde
109
110       This file is part of Math-PlanePath.
111
112       Math-PlanePath is free software; you can redistribute it and/or modify
113       it under the terms of the GNU General Public License as published by
114       the Free Software Foundation; either version 3, or (at your option) any
115       later version.
116
117       Math-PlanePath is distributed in the hope that it will be useful, but
118       WITHOUT ANY WARRANTY; without even the implied warranty of
119       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
120       General Public License for more details.
121
122       You should have received a copy of the GNU General Public License along
123       with Math-PlanePath.  If not, see <http://www.gnu.org/licenses/>.
124
125
126
127perl v5.28.0                      2017-12-M0a3th::PlanePath::WunderlichMeander(3)
Impressum