Methods of peparation of gels and emulsions