Evolution of 3D Polarization in Inhomogeneous Medium