The sequential quadratic programming (SQP) algorithm is introduced to optimize the geometry of radiative enclosures filled with participating medium. The design goal is to produce a uniform distribution of radiative heat flux on the pre-specified surface of a 2D radiative enclosure. The direct problem involves radiative heat transfer in the participating medium is solved by the discrete ordinate method in a body-fitted coordinate system. The inverse design task is formulated as an optimization problem. The SQP algorithm is applied to optimize the spatial positions of control points, and the Akima interpolation technique is employed to approximate the geometry of the design surface. The effects of radiative properties of participating medium, the number of control points, and temperature of heating surface on the optimization results are investigated. Retrieval results show that the design goal can be successfully satisfied using the SQP algorithm, and the present methodology is proved to be more efficient than other optimization techniques.