State the necessary conditions for producing total internal reflection of light. Draw ray diagrams to show how specially designed prisms make use of total internal reflection to obtain inverted image of the object by deviation of rays
(i) through 90° and (ii) through 180°.