I am looking for a closed form expression for the shortest distance between some arbitrary point in 3D and any arbitrary Ylm(theta,phi) where the value of Ylm for a given theta and phi is taken to mean radial distance. I guess it might help to clarify that Ylm are the usual notation for Laplace's spherical harmonics: https://en.wikipedia.org/wiki/Spherical_harmonics
For example, consider a point in 3D space given by coordinates (R, Th, Ph) in spherical coordinates. For l=0 and m=0 (i.e. for Y00), the distance from our point (R, Th, Ph) to Y00 is just abs(R-Y00(Th,Ph)) I am writing it this way because I want to avoid dealing with normalization constant for Y00 and ergo to avoid possible confusion but we all understand of course that Y00 is constant and does not depend on Th and Ph.
Consider another example. Y10 is a surface that looks like a dumbbell and let's pick our axes so this dumbbell extends in the z direction. In spherical coordinates we usually have z axis associated with Th=0 so a point on the +z axis has angular position Th=0, Ph=0 (Ph is arbitrary but I am making a choice here to be concrete). So the distance from any point on the +z axis whose R is greater than Y10(0,0) is going to be R-Y10(0,0). However if the point is on the +z axis but lies closer to origin than Y10(0,0) than the nearest distance to the Y10 surface is no longer necessarily abs(R-Y10(0,0)). For example, if R=0 then the point is on the surface defined by Y10 and the nearest distance is zero. And so I am asking for a general way to find a distance between a point in 3D given by (R,Th,Ph) in spherical coordinates and a surface given by (Ylm(theta,phi),theta,phi) for an arbitrary choice of l and m, known R,Th,Ph and for theta from 0 to pi and phi from 0 to 2*pi.
I know of other similar questions for simpler 3D shapes, like Shortest distance from a point to the paraboloid but I am not seeing any answers or even any literature on spherical harmonics and certainly not in the general case where l am m are arbitrary.