def crossection(center, radius, diraxis, matidx, mcmap):
        '''Create a round section of type matidx in mcmap.

        Passed values:
        center = [x, y, z] for the coordinates of the center block
        radius = <number> as the radius of the section.  May be a float or int.
        diraxis: The list index for the axis to make the section
        perpendicular to.  0 indicates the x axis, 1 the y, 2 the z.  The
        section will extend along the other two axies.
        matidx = <int> the integer value to make the section out of.
        mcmap = the array generated by make_mcmap
        matdata = <int> the integer value to make the block data value.
        '''
        rad = int(radius + .618)
        if rad <= 0:
            return None
        secidx1 = (diraxis - 1) % 3
        secidx2 = (1 + diraxis) % 3
        coord = [0, 0, 0]
        for off1 in range(-rad, rad + 1):
            for off2 in range(-rad, rad + 1):
                thisdist = sqrt((abs(off1) + .5) ** 2 + (abs(off2) + .5) ** 2)
                if thisdist > radius:
                    continue
                pri = center[diraxis]
                sec1 = center[secidx1] + off1
                sec2 = center[secidx2] + off2
                coord[diraxis] = pri
                coord[secidx1] = sec1
                coord[secidx2] = sec2
                assign_value(coord[0], coord[1], coord[2], matidx, mcmap)
Create a round section of type matidx in mcmap.

        Passed values:
        center = [x, y, z] for the coordinates of the center block
        radius = <number> as the radius of the section.  May be a float or int.
        diraxis: The list index for the axis to make the section
        perpendicular to.  0 indicates the x axis, 1 the y, 2 the z.  The
        section will extend along the other two axies.
        matidx = <int> the integer value to make the section out of.
        mcmap = the array generated by make_mcmap
        matdata = <int> the integer value to make the block data value.
        
stock-filters/Forester.py