This paper presents a design technique for transformation media that aim to reduce staircasing errors occurring in the numerical solution of electromagnetic boundary value problems by finite methods. The main idea is to place transformation media within the computational domain adapted to the Cartesian grid, and to determine the material parameters by mapping the staircase-approximated boundary of the geometry to its original boundary. In this manner, both the staircasing error is reduced, and a uniform and easy-to-generate mesh can be used. This technique also allows the numerical modeling of any arbitrarily-shaped object by using a 'single' mesh and by changing only the constitutive parameters within the transformation media. Several numerical simulations are illustrated in the context of electromagnetic scattering problems.