1Math::PlanePath::QuadriUcsIesrlaCnodnst(r3i)buted Perl DMoactuhm:e:nPtlaatnieoPnath::QuadricIslands(3)
2
3
4
6 Math::PlanePath::QuadricIslands -- quadric curve rings
7
9 use Math::PlanePath::QuadricIslands;
10 my $path = Math::PlanePath::QuadricIslands->new;
11 my ($x, $y) = $path->n_to_xy (123);
12
14 This path is concentric islands made from four sides each an eight
15 segment zig-zag (per the "QuadicCurve" path).
16
17 27--26 3
18 | |
19 29--28 25 22--21 2
20 | | | |
21 30--31 24--23 20--19 1
22 | 4--3 |
23 34--33--32 | 16--17--18 <- Y=0
24 | 1--2 |
25 35--36 7---8 15--14 -1
26 | | |
27 5---6 9 12--13 -2
28 | |
29 10--11 -3
30
31 ^
32 -3 -2 -1 X=0 1 2 3 4
33
34 The initial figure is the square N=1,2,3,4 then for the next level each
35 straight side expands to 4x longer and a zigzag like N=5 through N=13
36 and the further sides to N=36. The individual sides are levels of the
37 "QuadricCurve" path.
38
39 *---*
40 | |
41 *---* becomes *---* * *---*
42 | |
43 *---*
44 * <------ *
45 | ^
46 | |
47 | |
48 v |
49 * ------> *
50
51 The name "QuadricIslands" here is a slight mistake. Mandelbrot
52 ("Fractal Geometry of Nature" 1982 page 50) calls any islands initiated
53 from a square "quadric", not just this eight segment expansion. This
54 curve also appears (unnamed) in Mandelbrot's "How Long is the Coast of
55 Britain", 1967.
56
57 Level Ranges
58 Counting the innermost square as level 0, each ring is
59
60 length = 4 * 8^level many points
61 Nlevel = 1 + length[0] + ... + length[level-1]
62 = (4*8^level + 3)/7
63 Xstart = - 4^level / 2
64 Ystart = - 4^level / 2
65
66 For example the lower partial ring shown above is level 2 starting
67 N=(4*8^2+3)/7=37 at X=-(4^2)/2=-8,Y=-8.
68
69 The innermost square N=1,2,3,4 is on 0.5 coordinates, for example N=1
70 at X=-0.5,Y=-0.5. This is centred on the origin and consistent with
71 the (4^level)/2. Points from N=5 onwards are integer X,Y.
72
73 4-------3 Y=+1/2
74 | |
75 | o |
76 |
77 1-------2 Y=-1/2
78
79 X=-1/2 X=+1/2
80
82 See "FUNCTIONS" in Math::PlanePath for behaviour common to all path
83 classes.
84
85 "$path = Math::PlanePath::QuadricIslands->new ()"
86 Create and return a new path object.
87
88 Level Methods
89 "($n_lo, $n_hi) = $path->level_to_n_range($level)"
90 Return per "Level Ranges" above,
91
92 ( ( 4 * 8**$level + 3) / 7,
93 (32 * 8**$level - 4) / 7 )
94
96 Math::PlanePath, Math::PlanePath::QuadricCurve,
97 Math::PlanePath::KochSnowflakes, Math::PlanePath::GosperIslands
98
100 <http://user42.tuxfamily.org/math-planepath/index.html>
101
103 Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Kevin Ryde
104
105 This file is part of Math-PlanePath.
106
107 Math-PlanePath is free software; you can redistribute it and/or modify
108 it under the terms of the GNU General Public License as published by
109 the Free Software Foundation; either version 3, or (at your option) any
110 later version.
111
112 Math-PlanePath is distributed in the hope that it will be useful, but
113 WITHOUT ANY WARRANTY; without even the implied warranty of
114 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
115 General Public License for more details.
116
117 You should have received a copy of the GNU General Public License along
118 with Math-PlanePath. If not, see <http://www.gnu.org/licenses/>.
119
120
121
122perl v5.32.0 2020-07-28Math::PlanePath::QuadricIslands(3)