title: Generating a Sphere with Voxel
body: <p>I have been playing around with <a href="http://voxeljs.com/" rel="nofollow">voxeljs</a>, I'm new to 3D programming, and it says in the <a href="https://github.com/maxogden/voxel-engine#api" rel="nofollow">doc</a> that this code generates the "sphere world":</p>
  
  <pre><code>generate: function(x,y,z) {
     return x*x+y*y+z*z &lt;= 20*20 ? 1 : 0 // sphere world
  },
  </code></pre>
  
  <p>How is this actually generating a sphere? From my simple understanding, I think that it's basically "looping" through each "chunk" in the 3D world? Any further explanation or a point to a good tutorial on this would be a huge help!</p>