analytics

Wednesday, September 17, 2014

Honeycomb coordinates

The basic idea is to traverse the honey comb grid. Going up is adding to an i component, going down and right is adding to a j component, and going down and left is adding to a k component, and if you go down, up and left, or up and right, it is -1 times the i,j,k components respectively.
For example consider the black path one unit at a time:
You go up:
1,0,0
Up and right:
1,0,-1
Up:
2,0,-1
Up and right:
2,0,-2
etc...
2,1,-2
2,1,-3
2,2,-3
1,2,-3
So the final coordinate is 1,2,-3
Now consider the red path:
0,0,1
-1,0,1
-1,1,1
-2,1,1
-2,2,1
-2,2,0
-1,2,0
-1,2,-1
-1,3,-1
-1,3,-2
-1,4,-2
-1,4,-3
0,4,-3
0,3,-3
1,3,-3
1,2,-3
You still end up at 1,2,-3!

So it's kind of interesting to consider which coordinates are actually possible, for example -1,0,0 isn't possible to reach from the starting position's type of vertex in the above picture, but it is starting from the other type of vertex. I notice the possible coordinates are 0,0,0 and every other coordinate's components sum to an odd number for either type of starting vertex.

No comments:

Post a Comment