Path integral computation of lowest order modes in arbitrary-shaped inhomogeneous waveguides