Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By "voxel-based sphere" I mean a sphere made up of cubes. Sorry if that is not the correct terminology. Imagine a sphere made out of legos. Except each voxel is a cube (unlike most legos). Determining the voxel distribution to make the sphere I suppose would involve calculating the x/y/z of a position on the sphere and then 'snapping' it to the nearest multiple of the voxel width/height.

Here's a calculator that can generate one:

And here is an image of one (cross sectioned):

enter image description here

Given the diameter of this voxel sphere (in number of voxels, e.g. '20 voxels in diameter'), how can I calculate:

  1. The number of voxels in the sphere if it were hollow (kind of a 'surface area')
  2. The number of voxels in the sphere if it were solid (kind of a 'volume')

Is there a formula possible here? :)

share|cite|improve this question
Decompose it into cross sections; each segment should allow an explicit summation involving square roots and floor/ceiling functions. – anon Nov 10 '11 at 3:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.