.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" 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 turned on, 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Math::PlanePath::WunderlichSerpentine 3pm" .TH Math::PlanePath::WunderlichSerpentine 3pm "2014-08-30" "perl v5.20.1" "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. 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, .IX Xref "Wunderlich, Walter" .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, any 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 .PP Walter Wunderlich \*(L"Uber Peano-Kurven\*(R", Elemente der Mathematik, 28(1):1\-10, 1973. .SH "HOME PAGE" .IX Header "HOME PAGE" .SH "LICENSE" .IX Header "LICENSE" Copyright 2011, 2012, 2013, 2014 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 .