Abstract:The onset of transformation optics has opened avenues for designing of a plenitude of applications related to propagation of electromagnetic waves in anisotropic media. In this paper, an algorithm is proposed using a coordinate transformation and a piecewise function for the purpose of designing a three dimensional cloak having an arbitrary geometry which could be convex or non-convex in nature. The surfaces of the cloak as well as of the body under consideration are assumed to be conformal to each other. For an arbitrary geometry, the coordinate system needed to model the surface can be a non-orthogonal system. For the purpose of verification of the algorithm, a ray tracing process is carried out for an ellipsoid as well as for a concave surface having axial symmetry. In order to solve the Hamiltonian equation for the purpose of ray tracing, the process of finding the derivatives analytically, for an arbitrary geometry as considered here, becomes very cumbersome. Here, a numerical method is described which provides a better approximation to the partial derivatives than the conventional finite difference approach based on forward differences.