Presented here is a method of designing compensators for a single beam or one or more pairs of beams, not necessarily parallel opposed. The objective is to produce a flat distribution in a plane that may be perpendicular to the central ray or may be an arbitrarily oriented plane, for example, a plane that bisects the hinge angle between two beams. The method takes into account not only surface irregularities but also tissue inhomogeneities, hinge angles between beams, distance from the source, and even "horns" in the beam. The design process employs convolution of Monte Carlo generated pencil beams with photon fluence distributions, appropriately modified for the presence of beam modifiers (blocks and compensators), to compute dose in a flat homogeneous phantom. Corrections for inhomogeneities and surface curvature are applied by using computerized tomography information to determine the effective path length through tissue. Multiple interactions are used to arrive at a compensator that properly incorporates changes in radiation transport, and therefore dose distribution, resulting from the presence of beam-shaping devices. In each iteration it is assumed that the required reduction in dose at a point can be achieved by reducing the fluence along the ray joining the source to computation point proportionately. The compensator design is represented as a finely spaced matrix of thickness values which is entered into a prorammable milling maching for fabrication. Dose measurements in phantom exposed to 6-MV x rays with and without compensation are presented.