Optical branching in dye-doped polymeric waveguide