title: Create voxels from a sphere pack and store as boolean
body: <p>I'm trying to convert my output file from my matlab code that has an output of position vectors and sphere radius. I intend to create voxels from these spheres and store in boolean form i.e 1 for sphere, 0 for void. Please how do you advise I go about this. Here's an  example of the output.</p>
  
  <pre><code>Pos (x) ,       Pos (y),        Pos (z)        Radius
  
      -0.34316     -0.18477     -0.00897   0.0900
      -0.18425     -0.20463      0.08040   0.020
      -0.46883     -0.49809      0.36954   0.020
       0.24727     -0.19437     -0.28274   0.0876
       0.39771      0.49293     -0.49469   0.0200
      -0.04368      0.26251     -0.07504   0.0200
      -0.34705      0.04092      0.37070   0.0200
  </code></pre>
  
  <p>Here's a snippet of the matlab code I'm working with. The spheres are originally in a lattice space.Thanks</p>
  
  <pre><code>coords=zeros(N,3); % list of the 3D positions of all particles
  
  overlap=(6*phi/(pi*N))^(1/3);
  
  % create initial, evenly-spaced lattice
  numcell=(ceil(N^(1/3)));
  
  cellside=1/numcell;
  
  hh=linspace(-.5+.5*cellside,.5-.5*cellside,numcell);
  
  for ii=1:N
  
  coords(ii,1)=hh(ceil(ii/ceil(N/numcell)));
  
  coords(ii,2)=hh(floor(mod(ii,ceil(N/numcell))/numcell)+1);
  
  coords(ii,3)=hh(mod(ii,numcell)+1);
  
  end                               
  scatter3(coords(:,1),coords(:,2),coords(:,3),'filled');   
  </code></pre>