Re: Hexagonal Spiral
- To: mathgroup at smc.vnet.net
- Subject: [mg56962] Re: Hexagonal Spiral
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Wed, 11 May 2005 05:24:29 -0400 (EDT)
- Organization: The University of Western Australia
- References: <d5mub1$dpm$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <d5mub1$dpm$1 at smc.vnet.net>, zak <chocolatez at gmail.com>
wrote:
> the purpose of this message is to draw a hexagonal spiral and then
> divide every edge to the suitable numbers of points, then map the
> prime numbers to the all points of the spiral.
In a recent posting the following code for creating a spiral on an
integer lattice was presented.
IntegerSpiral[n_] := {Re[#],Im[#]}& /@
Fold[Join[#1, Last[#1]+I^#2 Range[#2/2]]&, {0}, Range[n]]
The idea is that the length of the limbs of the spiral follow the
pattern 1,1,2,2,3,3,4,4,5,5,... and that each limb is at a 90 degree
angle to the previous limb (multiplication by I in the complex plane).
Changing I to Exp[I Pi/3] means that each limb is at a 60 degree angle
to the previous limb -- a hexagonal spiral:
HexagonalSpiral[n_] := {Re[#],Im[#]}& /@
Fold[Join[#1, Last[#1]+Exp[I Pi/3]^#2 Range[#2/2]]&, {0}, Range[n]]
One can use
spiral = HexagonalSpiral[100]
to construct the spiral,
primes = spiral[[ Prime[Range[PrimePi[Length[spiral]]]] ]];
to find the prime points, and
ListPlot[spiral, PlotJoined->True, Axes -> False,
AspectRatio->Automatic,
Epilog -> {PointSize[0.02], Point /@ primes}];
to draw the spiral and display those with prime index as dots.
> this is motivated by the figure:
> http://www.cut-the-knot.org/ctk/HexMosaic.gif
> in an article in:
> http://www.cut-the-knot.org/ctk/FromLCarrollToArchimedes.shtml
Tweaking might be needed so as to get the above code to exactly
correspond to this figure.
Cheers,
Paul
--
Paul Abbott Phone: +61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
AUSTRALIA http://physics.uwa.edu.au/~paul
http://InternationalMathematicaSymposium.org/IMS2005/