>
    30  30   0; <span class="keyword">...</span>
    30  30  30];
</pre><h2>Ball<a name="3"></a></h2><pre class="codeinput"><span class="comment">% sphere is defined by center and radius</span>
sphere = [center 40];

<span class="comment">% generation of 3D image</span>
img = discreteBall(lx, ly, lz, sphere);

<span class="comment">% display image isosurface</span>
f = figure; set(gca, <span class="string">'fontsize'</span>, 14);
isosurface(img, .5);

<span class="comment">% setup display</span>
hold <spa