caused to impinge upon a thin coating of polyaniline which is on a phototransmissive substrate a portion of the beam is reflected the remainder refracted transmitted and partly absorbed application of a modulator beam at a second angle changes the index of refraction of the polyaniline thereby altering the direction and the percentage of the probe beam transmitted and reflected the preferred embodiment has the probe beam incident on the polyaniline at the critical angle and the modulator beam preferably of wavelength between 12 100 angstroms 1 5 ev and 21 800 angstroms 2 7 ev thus the present invention further relates to a method of changing the refractive index of polyaniline comprising the steps b applying a first beam of light of wavelength x at the critical angle y to the polyaniline surface and c applying a second beam of light of wavelength z to the polyaniline surface whereby the second beam is absorbed by the polyaniline changing the index of refraction of the polyaniline whereby the transmission of the first beam through the phototransmissive substrate is altered the preferred wavelength x of the first or probe beam of light is dependent on the form of polyaniline utilized for emeraldine base polymer the preferred wavelength x of the first or probe beam of light is in one or more of.