The weighted minimal surface problem in heterogeneous media is studied
in this paper. The solution to the weighted minimal surface problem
is continuous but the derivatives have a jump across the interface
where the medium property is discontinuous. The jump condition of the
derivatives derived in this paper generalized the Snell's law in
geometric optics to weighted minimal surfaces of co-dimension one in
any dimensional space. A numerical method based on the gradient flow
and the maximum principal preserving immersed interface method is
developed to solve this nonlinear elliptic interface problem with
jump conditions. Numerical computations are presented to verify both
the analysis and the numerical algorithm.