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
- How the grid is rendered.
- 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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.