Explicit references to sex as an art form went through four distinct periods of India's history: ancient, Islamic, British and post-Independent. Our forefathers understood sex as the most potent emotion in life and gave it the importance it deserved in their writings, paintings and sculpture. You can find examples in John Brough's translations of Poems from the Sanskrit, as well as in illustrated editions of the Kama Sutra. It was a time when sculptors were decorating walls of temples in Khajuraho and Konarak, depicting lusty men and beautifully rounded young women copulating with gay abandon. Censorship by the state or society did not exist.
Things changed with the invasion of Muslims in northern India. Islamic puritanism took over. Though they gave India many of its beautiful buildings, and in due course of time evolved Urdu as the lingua franca, depictions of sex in writing, painting or sculpture became taboo.