title: C# Draw perfect sphere from center(x,y,z) to outermost(x,y,z) inside a 3d grid space
body: <p>I have values for the following variables::</p>
  
  <p>x0,y0,z0 = coords of the first selection (intended to be center of sphere)</p>
  
  <p>x1,y1,z1 = coords of the second selection (intended to be an outmost point for the sphere)</p>
  
  <p>ishollow = boolean value indicating if the sphere should be hollow</p>
  
  <p>The result must draw, the best it can, a perfect sphere. Here is an example:</p>
  
  <ul>
  <li>3D space is 100x100x100</li>
  <li>point 50,50,50 is selected first (i.e. x0 = 50; y0 = 50, z0 = 50)</li>
  <li>point 76,67,84 is selected second (i.e. x1 = 76; y1 = 67, z1 = 84)</li>
  <li>sphere is drawn with first point as center and second point as the greatest distance of any point in the sphere from the center</li>
  <li>sphere must be made up of points plotted with function markpointt(x,y,z,hollowmark)</li>
  <li>sphere must be hollow if ishollow = true. to make it hollow i need to specify if hollowmark is true, if so the point still needs to be placed but it overrides any existing points with a black point</li>
  </ul>
  
  <p>I was unsure of where to start, can you point me in the direction to identify the mathimatical functions to code such a process? Thank you for your assistance in advance.</p>