1Math::PlanePath::HexArmUss(e3r)Contributed Perl DocumentMaattiho:n:PlanePath::HexArms(3)
2
3
4
6 Math::PlanePath::HexArms -- six spiral arms
7
9 use Math::PlanePath::HexArms;
10 my $path = Math::PlanePath::HexArms->new;
11 my ($x, $y) = $path->n_to_xy (123);
12
14 This path follows six spiral arms, each advancing successively,
15
16 ...--66 5
17 \
18 67----61----55----49----43 60 4
19 / \ \
20 ... 38----32----26----20 37 54 3
21 / \ \ \
22 44 21----15---- 9 14 31 48 ... 2
23 / / \ \ \ \ \
24 50 27 10---- 4 3 8 25 42 65 1
25 / / / / / / /
26 56 33 16 5 1 2 19 36 59 <-Y=0
27 / / / / \ / / /
28 62 39 22 11 6 7----13 30 53 -1
29 \ \ \ \ \ / /
30 ... 45 28 17 12----18----24 47 -2
31 \ \ \ /
32 51 34 23----29----35----41 ... -3
33 \ \ /
34 57 40----46----52----58----64 -4
35 \
36 63--... -5
37
38 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
39 -9 -8 -7 -6 -5 -4 -3 -2 -1 X=0 1 2 3 4 5 6 7 8 9
40
41 The X,Y points are integers using every second position to give a
42 triangular lattice, per "Triangular Lattice" in Math::PlanePath.
43
44 Each arm is N=6*k+rem for a remainder rem=0,1,2,3,4,5, so sequences
45 related to multiples of 6 or with a modulo 6 pattern may fall on
46 particular arms.
47
48 Abundant Numbers
49 The "abundant" numbers are those N with sum of proper divisors > N.
50 For example 12 is abundant because it's divisible by 1,2,3,4,6 and
51 their sum is 16. All multiples of 6 starting from 12 are abundant.
52 Plotting the abundant numbers on the path gives the 6*k arm and some
53 other points in between,
54
55 * * * * * * * * * * * * * * ...
56 * * *
57 * * * * * * *
58 * * *
59 * * * *
60 * * * *
61 * * * * * * * * * *
62 * * * * * *
63 * * * * * * * * *
64 * * * * * * *
65 * * * * * * * *
66 * * * * * * *
67 * * * * * *
68 * * * * * * *
69 * * * * *
70 * * * * * * * *
71 * * * * *
72 * * * * *
73 * * * * * * *
74 * * * * * * * * * * *
75 * * * *
76 * * * *
77 * * * *
78 * * * * *
79 * *
80 * * * * * * * * * * * * * * *
81
82 There's blank arms either side of the 6*k because 6*k+1 and 6*k-1 are
83 not abundant until some fairly big values. The first abundant 6*k+1
84 might be 5,391,411,025, and the first 6*k-1 might be 26,957,055,125.
85
87 See "FUNCTIONS" in Math::PlanePath for behaviour common to all path
88 classes.
89
90 "$path = Math::PlanePath::HexArms->new ()"
91 Create and return a new square spiral object.
92
93 "($x,$y) = $path->n_to_xy ($n)"
94 Return the X,Y coordinates of point number $n on the path.
95
96 For "$n < 1" the return is an empty list, as the path starts at 1.
97
98 Fractional $n gives a point on the line between $n and "$n+6", that
99 "$n+6" being the next on the same spiralling arm. This is probably
100 of limited use, but arises fairly naturally from the calculation.
101
102 Descriptive Methods
103 "$arms = $path->arms_count()"
104 Return 6.
105
107 Math::PlanePath, Math::PlanePath::SquareArms,
108 Math::PlanePath::DiamondArms, Math::PlanePath::HexSpiral
109
111 <http://user42.tuxfamily.org/math-planepath/index.html>
112
114 Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020
115 Kevin Ryde
116
117 This file is part of Math-PlanePath.
118
119 Math-PlanePath is free software; you can redistribute it and/or modify
120 it under the terms of the GNU General Public License as published by
121 the Free Software Foundation; either version 3, or (at your option) any
122 later version.
123
124 Math-PlanePath is distributed in the hope that it will be useful, but
125 WITHOUT ANY WARRANTY; without even the implied warranty of
126 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
127 General Public License for more details.
128
129 You should have received a copy of the GNU General Public License along
130 with Math-PlanePath. If not, see <http://www.gnu.org/licenses/>.
131
132
133
134perl v5.36.0 2023-01-20 Math::PlanePath::HexArms(3)