RE: Hexagonal indexing?
- To: mathgroup at smc.vnet.net
- Subject: [mg67740] RE: [mg67675] Hexagonal indexing?
- From: "Erickson Paul-CPTP18" <Paul.Erickson at Motorola.com>
- Date: Thu, 6 Jul 2006 06:52:43 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I don't know how standard, but I've commonly seen the indexing axes at 60 degs where each axes is oriented with the intersection in the center of a hexagonal and each axes goes through the center of one of the edges. It's complete and unique, but not orthogonal. That's not hard, as there is a straight forward mapping to / from a Euclidian space. As to nearest neighbors, {{i+1,j},{i, j+i}, {i-1, j+1}, {i-1, j}, {i, j-1}, {i+1, j-1}} are the six neighbor indeces. These can also be from selecting -1,0,+1 for each i and j, but not allowing {-1,-1}, {0,0}, and {+1,+1}. Paul -----Original Message----- From: AES [mailto:siegman at stanford.edu] To: mathgroup at smc.vnet.net Subject: [mg67740] [mg67675] Hexagonal indexing? Partly out of a practical problem, partly out of curiousity, are there any standard conventions for "hexagonal indexing"? -- that is, for attaching a single index k or a double index [m, n] to the points in a planar hexagonal array so that one can conveniently do things like --FInd the 6 nearest neighbors {m', n'] to a point [n, m] ? --Find the coordinates of an arbitrary array point relative to an optimally chosen origin or center? --Find the distances between two array points [m', n] and [m", n"] ? --Find all the array points on the outer rim of a finite hexagonal array having 6 identical flat faces, or a finite hexagonal array maximally filling a spherical shell? --Efficiently convert the double indices (if used) to a single Mathematica style array index? I can surely work out some of these answers for myself, but I've never encountered a "standard method" for doing these, and wonder if there is an optimal or conventional approach?