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: http://neil.fraser.name/news/2006/11/17/
And here is an image of one (cross sectioned):
Given the diameter of this voxel sphere (in number of voxels, e.g. '20 voxels in diameter'), how can I calculate:
- The number of voxels in the sphere if it were hollow (kind of a 'surface area')
- The number of voxels in the sphere if it were solid (kind of a 'volume')
Is there a formula possible here? :)