974) in his Kitab al-Majalis wa 'l-musayarat, the Fatimid caliph Al-Mu'izz li-Din Allah demanded a pen that would not stain his hands or clothes, and was provided with a pen that held ink in a reservoir, allowing it to be held upside-down without leaking.[81] Law of cotangents: This was first given by Ibn al-Haytham.[13] Muqarnas: The origin of the muqarnas can be traced back to the mid-tenth century in northeastern Iran and central North Africa,[82] as well as the Mesopotamian region.[83] Pascal's triangle: The Persian mathematician Al-Karaji (953–1029) wrote a now lost book which contained the first description of Pascal's triangle.[84][85][86] Ruffini-Horner Algorithm: Discovered by ibn al-Haytham[13] Sextant and mural instrument: The first known mural sextant was constructed in Ray, Iran, by Abu-Mahmud al-Khujandi in 994.[87] Shale oil extraction: In the 10th century, the Arab physician Masawaih al-Mardini (Mesue the Younger) described a method of extraction of oil from "some kind of bituminous shale".[88] Snell's law: The law was first accurately described by the Persian scientist Ibn Sahl at the Baghdad court in 984.