Using the principle of light reflection.
Light enters from one side of the prism and exits from the other side. The exiting light will be deflected toward the bottom surface (the third side). The size of the deflection angle is related to the refractive index of the prism and the vertex angle of the prism. It is related to the angle of incidence. When light is incident obliquely from air into other media, the angle of refraction is smaller than the angle of incidence. .When light enters air obliquely from other media, the angle of refraction is greater than the angle of incidence.