in reply to Re: (cLive ;-) Re: getting my neighbours in an N-dimensional space
in thread getting my neighbours in an N-dimensional space

  1. 2 neighbors
  2. 8 neighbors
  3. 26 neighbors
  4. 80 neighbors
That's for all neighbors. As for neighbors near the origin ... that's a completely different set of numbers. And, in 3-D, it's not (2**N - 1). It's some weirder formula.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

  • Comment on Re: Re: (cLive ;-) Re: getting my neighbours in an N-dimensional space