Kangxi Emperor
He became close friends with the Kangxi Emperor, who frequently requested his teaching in geometry, philosophy and music.