nt">% iterate on orientations</span>
<span class="keyword">for</span> i = 1:3
    torus = [center 30 10 angles(i, :)];

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

    <span class="comment">% display image isosurface</span>
    clf; set(gca, <span class="string">'fontsize'</span>, 14);
    patch(isosurface(img, .5), <span class="string">'FaceColor'</span>, <span class="string">'g'</span>, <span class="string">'LineStyle'</span>, <span class="string"