According to one version of his biography,[18] al-Haytham, confident about the practical application of his mathematical knowledge, assumed he could regulate the floods of the Nile. Having been ordered to do so by Al-Hakim bi-Amr Allah, the sixth ruler of the Fatimid caliphate, he quickly realised its impossibility. Fearing for his life, he feigned madness[1][19] and was placed under house arrest.
There's a similar story about Galileo, and it's used as an example of how overbearing the Catholic Church was at the time. But nooo, in this case, it's an example of how "golden" Islam is. Makes sense!
The Catholic Church's opposition to Galileo was because his theories contradicted the Church's teachings.
What's religious about what happened to al-Haytham? He claimed he could divert the Nile, he was ordered to do so by the ruler, realised he couldn't do it after all so pretended to be mad and got thrown in jail. What's Islam got to do with that? You think any 11th century European king would have been more lenient?