[Author of the blog post here.]
For a more old-school approach, see "Sphere Mapping" by Frédéric Goset.
http://fredericgoset.ovh/informatique/oldschool/en/spheremap...
(This may well be why the LLM "knows" about this. May be interesting to compare approaches and variable names. – It's also linked in the article.)
https://www.youtube.com/watch?v=_aTh5_FTasg