Hacker News new | past | comments | ask | show | jobs | submit login

I don't get the tiling. Cells are 7x7 dual (?) Pixels yet they can be divided by 2,3 and 6?

Cubes are 4x4x4 cells yet can be divided by 3?

How does that work out?




By dual pixel they mean a horizontal line that is one pixel tall and two pixel wide. Each cell's side is 7 such dual pixels arranged diagonally. But since you stack tiles so that the grid line overlaps, it means that two 7-wide cells are together only 13-wide (and not 14). The top dual pixel of one is the bottom dual pixel of the other.

Going smaller, two 4-wide cells will again lose one line to the overlap and thus join to make a 7 (that's how 7 divides by 2).

Three 3-wide cells join and lose two lines to overlap and thus again join to make 33-2 = 7

Six 2-wide cells join and lose fives lines to overlap 62-5 = 7.

Or in general for n cells, there are n-1 overlaps, so if they are k-wide the combined cell will be n*k - (n-1) wide.


It makes more intuitive sense when you notice 7-1 = 6.

All "outer" dimensions are 6*n + 1.

So 4 cells are actually 4*6+1 not 4*7

So you can see that 4 cells can be divided into 3 parts in this way:

3*4*6+1 = 3*4*2*3+1 = 3*2*4*3+1

All of that is because there's 1px overlap between neighboring cells.


In spite of what the page says, the cell isn't 7x7. One diamond-shaped cell is 24 pixels wide, measuring from the center of the leftmost pixel to the center of the rightmost pixel, and 12 pixels tall center-to-center.


You mean that a cell has a diameter of 24 pixels. “Width” would be measured along one of the (angled) sides of the cell.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: