.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Math::PlanePath::QuadricIslands 3pm" .TH Math::PlanePath::QuadricIslands 3pm "2021-01-23" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Math::PlanePath::QuadricIslands \-\- quadric curve rings .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Math::PlanePath::QuadricIslands; \& my $path = Math::PlanePath::QuadricIslands\->new; \& my ($x, $y) = $path\->n_to_xy (123); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This path is concentric islands made from four sides each an eight segment zig-zag (per the \f(CW\*(C`QuadicCurve\*(C'\fR path). .PP .Vb 10 \& 27\-\-26 3 \& | | \& 29\-\-28 25 22\-\-21 2 \& | | | | \& 30\-\-31 24\-\-23 20\-\-19 1 \& | 4\-\-3 | \& 34\-\-33\-\-32 | 16\-\-17\-\-18 <\- Y=0 \& | 1\-\-2 | \& 35\-\-36 7\-\-\-8 15\-\-14 \-1 \& | | | \& 5\-\-\-6 9 12\-\-13 \-2 \& | | \& 10\-\-11 \-3 \& \& ^ \& \-3 \-2 \-1 X=0 1 2 3 4 .Ve .PP The initial figure is the square N=1,2,3,4 then for the next level each straight side expands to 4x longer and a zigzag like N=5 through N=13 and the further sides to N=36. The individual sides are levels of the \&\f(CW\*(C`QuadricCurve\*(C'\fR path. .PP .Vb 11 \& *\-\-\-* \& | | \& *\-\-\-* becomes *\-\-\-* * *\-\-\-* \& | | \& *\-\-\-* \& * <\-\-\-\-\-\- * \& | ^ \& | | \& | | \& v | \& * \-\-\-\-\-\-> * .Ve .PP The name \f(CW\*(C`QuadricIslands\*(C'\fR here is a slight mistake. Mandelbrot (\*(L"Fractal Geometry of Nature\*(R" 1982 page 50) calls any islands initiated from a square \&\*(L"quadric\*(R", not just this eight segment expansion. This curve also appears (unnamed) in Mandelbrot's \*(L"How Long is the Coast of Britain\*(R", 1967. .SS "Level Ranges" .IX Subsection "Level Ranges" Counting the innermost square as level 0, each ring is .PP .Vb 5 \& length = 4 * 8^level many points \& Nlevel = 1 + length[0] + ... + length[level\-1] \& = (4*8^level + 3)/7 \& Xstart = \- 4^level / 2 \& Ystart = \- 4^level / 2 .Ve .PP For example the lower partial ring shown above is level 2 starting N=(4*8^2+3)/7=37 at X=\-(4^2)/2=\-8,Y=\-8. .PP The innermost square N=1,2,3,4 is on 0.5 coordinates, for example N=1 at X=\-0.5,Y=\-0.5. This is centred on the origin and consistent with the (4^level)/2. Points from N=5 onwards are integer X,Y. .PP .Vb 5 \& 4\-\-\-\-\-\-\-3 Y=+1/2 \& | | \& | o | \& | \& 1\-\-\-\-\-\-\-2 Y=\-1/2 \& \& X=\-1/2 X=+1/2 .Ve .SH "FUNCTIONS" .IX Header "FUNCTIONS" See \*(L"\s-1FUNCTIONS\*(R"\s0 in Math::PlanePath for behaviour common to all path classes. .ie n .IP """$path = Math::PlanePath::QuadricIslands\->new ()""" 4 .el .IP "\f(CW$path = Math::PlanePath::QuadricIslands\->new ()\fR" 4 .IX Item "$path = Math::PlanePath::QuadricIslands->new ()" Create and return a new path object. .SS "Level Methods" .IX Subsection "Level Methods" .ie n .IP """($n_lo, $n_hi) = $path\->level_to_n_range($level)""" 4 .el .IP "\f(CW($n_lo, $n_hi) = $path\->level_to_n_range($level)\fR" 4 .IX Item "($n_lo, $n_hi) = $path->level_to_n_range($level)" Return per \*(L"Level Ranges\*(R" above, .Sp .Vb 2 \& ( ( 4 * 8**$level + 3) / 7, \& (32 * 8**$level \- 4) / 7 ) .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" Math::PlanePath, Math::PlanePath::QuadricCurve, Math::PlanePath::KochSnowflakes, Math::PlanePath::GosperIslands .SH "HOME PAGE" .IX Header "HOME PAGE" .SH "LICENSE" .IX Header "LICENSE" Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Kevin Ryde .PP This file is part of Math-PlanePath. .PP Math-PlanePath is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. .PP Math-PlanePath is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with Math-PlanePath. If not, see .