.\" 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::WunderlichSerpentine 3pm" .TH Math::PlanePath::WunderlichSerpentine 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::WunderlichSerpentine \-\- transpose parts of Peano curve, including coil order .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Math::PlanePath::WunderlichSerpentine; \& my $path = Math::PlanePath::WunderlichSerpentine\->new (serpentine_type => \*(Aq111_000_111\*(Aq); \& my ($x, $y) = $path\->n_to_xy (123); \& \& # or another radix digits ... \& my $path5 = Math::PlanePath::WunderlichSerpentine\->new (radix => 5); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is an integer version of Walter Wunderlich's variations on the \f(CW\*(C`PeanoCurve\*(C'\fR. .IX Xref "Wunderlich, Walter" .Sp .RS 4 Walter Wunderlich, \*(L"Uber Peano-Kurven\*(R", Elemente der Mathematik, volume 28, number 1, 1973, pages 1\-10. , .RE .PP A \*(L"serpentine type\*(R" controls transposing of selected 3x3 sub-parts. The default is \*(L"alternating\*(R" 010,101,010 which transposes every second sub-part, .PP .Vb 10 \& 8 | 60\-\-61\-\-62\-\-63 68\-\-69 78\-\-79\-\-80\-\-81 \& | | | | | | | \& 7 | 59\-\-58\-\-57 64 67 70 77\-\-76\-\-75 ... \& | | | | | | \& 6 | 54\-\-55\-\-56 65\-\-66 71\-\-72\-\-73\-\-74 \& | | \& 5 | 53 48\-\-47 38\-\-37\-\-36\-\-35 30\-\-29 \& | | | | | | | | \& 4 | 52 49 46 39\-\-40\-\-41 34 31 28 \& | | | | | | | | \& 3 | 51\-\-50 45\-\-44\-\-43\-\-42 33\-\-32 27 \& | | \& 2 | 6\-\- 7\-\- 8\-\- 9 14\-\-15 24\-\-25\-\-26 \& | | | | | | \& 1 | 5\-\- 4\-\- 3 10 13 16 23\-\-22\-\-21 \& | | | | | | \& Y=0 | 0\-\- 1\-\- 2 11\-\-12 17\-\-18\-\-19\-\-20 \& | \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& X=0 1 2 3 4 5 6 7 8 .Ve .PP \&\f(CW\*(C`serpentine_type\*(C'\fR can be a string of 0s and 1s, with optional space, comma or _ separators at each group of 3, .PP .Vb 4 \& "011111011" 0/1 string \& "011,111,011" \& "011_111_011" \& "011 111 011" .Ve .PP or special values .PP .Vb 3 \& "alternating" 01010101.. the default \& "coil" 11111... all 1s described below \& "Peano" 00000... all 0s, gives PeanoCurve .Ve .PP Each \*(L"1\*(R" sub-part is transposed. The string is applied in order of the N parts, irrespective of what net reversals and transposes are in force on a particular part. .PP When no parts are transposed, which is a string of all 0s, the result is the same as the \f(CW\*(C`PeanoCurve\*(C'\fR. The special \f(CW\*(C`serpentine_type => "Peano"\*(C'\fR gives that. .SS "Coil Order" .IX Subsection "Coil Order" \&\f(CW\*(C`serpentine_type => "coil"\*(C'\fR means \*(L"111 111 111\*(R" to transpose all parts. The result is like a coil viewed side-on, .PP .Vb 10 \& 8 24\-\-25\-\-26\-\-27\-\-28\-\-29 78\-\-79\-\-80\-\-81\-\-... \& | | | \& 7 23\-\-22\-\-21 32\-\-31\-\-30 77\-\-76\-\-75 \& | | | \& 6 18\-\-19\-\-20 33\-\-34\-\-35 72\-\-73\-\-74 \& | | | \& 5 17\-\-16\-\-15 38\-\-37\-\-36 71\-\-70\-\-69 \& | | | \& 4 12\-\-13\-\-14 39\-\-40\-\-41 66\-\-67\-\-68 \& | | | \& 3 11\-\-10\-\- 9 44\-\-43\-\-42 65\-\-64\-\-63 \& | | | \& 2 6\-\- 7\-\- 8 45\-\-46\-\-47 60\-\-61\-\-62 \& | | | \& 1 5\-\- 4\-\- 3 50\-\-49\-\-48 59\-\-58\-\-57 \& | | | \& Y=0 0\-\- 1\-\- 2 51\-\-52\-\-53\-\-54\-\-55\-\-56 \& \& X=0 1 2 3 4 5 6 7 8 .Ve .PP Whenever \f(CW\*(C`serpentine_type\*(C'\fR begins with a \*(L"1\*(R", the initial sub-part is transposed at each level. The first step N=0 to N=1 is kept fixed along the X axis, then the higher levels are transposed. For example in the coil above The N=9 to N=17 part is upwards, and then the N=81 to N=161 part is to the right, and so on. .SS "Radix" .IX Subsection "Radix" The optional \f(CW\*(C`radix\*(C'\fR parameter gives the size of the sub-parts, similar to the \f(CW\*(C`PeanoCurve\*(C'\fR \f(CW\*(C`radix\*(C'\fR parameter (see \&\*(L"Radix\*(R" in Math::PlanePath::PeanoCurve). For example radix 5 gives .PP .Vb 1 \& radix => 5 \& \& 4 | 20\-21\-22\-23\-24\-25 34\-35 44\-45 70\-71\-72\-73\-74\-75 84\-85 \& | | | | | | | | | | | \& 3 | 19\-18\-17\-16\-15 26 33 36 43 46 69\-68\-67\-66\-65 76 83 86 \& | | | | | | | | | | | \& 2 | 10\-11\-12\-13\-14 27 32 37 42 47 60\-61\-62\-63\-64 77 82 87 \& | | | | | | | | | | | \& 1 | 9\-\-8\-\-7\-\-6\-\-5 28 31 38 41 48 59\-58\-57\-56\-55 78 81 88 \& | | | | | | | | | | | \& Y=0 | 0\-\-1\-\-2\-\-3\-\-4 29\-30 39\-40 49\-50\-51\-52\-53\-54 79\-80 89\-.. \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& X=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 .Ve .PP Like the \f(CW\*(C`PeanoCurve\*(C'\fR, if the radix is even then the ends of each sub-part don't join up. For example in radix 4 N=15 isn't next to N=16, nor N=31 to N=32, etc. .PP .Vb 10 \& | | \& 3 | 15\-\-14\-\-13\-\-12 16 23\-\-24 31 47\-\-46\-\-45\-\-44 48 55\-\-56 63 \& | | | | | | | | | | | \& 2 | 8\-\- 9\-\-10\-\-11 17 22 25 30 40\-\-41\-\-42\-\-43 49 54 57 62 \& | | | | | | | | | | | \& 1 | 7\-\- 6\-\- 5\-\- 4 18 21 26 29 39\-\-38\-\-37\-\-36 50 53 58 61 \& | | | | | | | | | | | \& Y=0 | 0\-\- 1\-\- 2\-\- 3 19\-\-20 27\-\-28 32\-\-33\-\-34\-\-35 51\-\-52 59\-\-60 \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& X=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 .Ve .PP In the \f(CW\*(C`serpentine_type\*(C'\fR 0,1 form, space, comma, etc, separators should group \f(CW\*(C`radix\*(C'\fR many values, so for example .PP .Vb 1 \& serpentine_type => "00000_11111_00000_00000_11111" .Ve .PP The intention is to do something friendly if the separators are not on such boundaries, so that say 000_111_000 can have a sensible meaning in a radix higher than 3. But exactly what is not settled, so always give a full string of desired 0,1 for now. .SH "FUNCTIONS" .IX Header "FUNCTIONS" See \*(L"\s-1FUNCTIONS\*(R"\s0 in Math::PlanePath for the behaviour common to all path classes. .ie n .IP """$path = Math::PlanePath::WunderlichSerpentine\->new ()""" 4 .el .IP "\f(CW$path = Math::PlanePath::WunderlichSerpentine\->new ()\fR" 4 .IX Item "$path = Math::PlanePath::WunderlichSerpentine->new ()" .PD 0 .ie n .IP """$path = Math::PlanePath::WunderlichSerpentine\->new (serpentine_type => $str, radix => $r)""" 4 .el .IP "\f(CW$path = Math::PlanePath::WunderlichSerpentine\->new (serpentine_type => $str, radix => $r)\fR" 4 .IX Item "$path = Math::PlanePath::WunderlichSerpentine->new (serpentine_type => $str, radix => $r)" .PD Create and return a new path object. .Sp The optional \f(CW\*(C`radix\*(C'\fR parameter gives the base for digit splitting. The default is ternary, radix 3. The radix should be an odd number, 3, 5, 7, 9 etc. .SH "SEE ALSO" .IX Header "SEE ALSO" Math::PlanePath, Math::PlanePath::PeanoCurve .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 .