title: How do I compute the linear index of a 3D coordinate and vice versa?
body: <p>If I have a point (x, y z), how do I find the linear index, i for that point? My numbering scheme would be (0,0,0) is 0, (1, 0, 0) is 1, . . ., (0, 1, 0) is the max-x-dimension, ....
  Also, if I have a linear coordinate, i, how do I find (x, y, z)?
  I can't seem to find this on google, all the results are filled with other irrelevant stuff. Thank you!</p>