We establish an algorithm that produces a new solution to the Einstein field
equations, with an anisotropic matter distribution, from a given seed isotropic
solution. The new solution is expressed in terms of integrals of known
functions, and the integration can be completed in principle. The applicability
of this technique is demonstrated by generating anisotropic isothermal spheres
and anisotropic constant density Schwarzschild spheres. Both of these solutions
are expressed in closed form in terms of elementary functions, and this
facilitates physical analysis.Comment: 23 pages, To appear in Math. Meth. Appl. Sc