Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: In search of the perfect digital hexagon

by pbeckingham (Parson)
on Aug 14, 2004 at 01:20 UTC ( [id://382880]=note: print w/replies, xml ) Need Help??


in reply to In search of the perfect digital hexagon

I am shamelessly ripping off fletch's work here, but the following (hexagonal) grid:

-8 . . . - - -8 -7 . . . . - ^ -7 -6 . . . . - - - - -6 -5 . . - . a a - ^ ? ? - -5 -4 . . . . k o ! - ^ ? ? ? -4 -3 . - . a h j a ^ ^ ^ ^ ^ - -3 -2 . . - . a a a ^ a a - - - -2 -1 . . . a a a b + + ^ ^ - -1 0 . . . m c u a a - ^ - ^ 0 1 . - . a a . a a - - ^ 1 2 - ^ ^ a a a ^ a - - ^ 2 3 - - - - - - - . . - 3 4 ^ - - - - - ^ - - 4 5 - ^ - - ^ - - - 5
Is actually the same grid as this rectangular grid:
-8 ...-- -8 -7 ....-^ -7 -6 ....---- -6 -5 ..-.aa-^??- -5 -4 ....ko!-^??? -4 -3.-.ahja^^^^^- -3 -2 ..-.aaa^aa--- -2 -1 ...aaab++^^- -1 0 ...mcuaa-^-^ 0 1 .-.aa.aa--^ 1 2 -^^aaa^a--^ 2 3 -------..- 3 4 ^-----^-- 4 5 -^--^--- 5
It is just a question of
  1. How the grid is rendered.
  2. how a cell's neighboring cells are determined.
Once the data structure is reduced to rectangular, the mystery of the hexagon disappears. It is this kind of thinking that reduces a checkerboard to an 8 x 4 board, for certain games.



pbeckingham - typist, perishable vertebrate.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://382880]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found