On Mar 28, 2:43 pm, "Clay" <phys...@bellsouth.net> wrote:> On Mar 28, 6:40 am, "glowkeeper" <glowkee...@yahoo.co.uk> wrote: > > > > > > > On Mar 27, 3:58 pm, "Clay" <phys...@bellsouth.net> wrote: > > > > On Mar 27, 5:26 am, "glowkeeper" <glowkee...@yahoo.co.uk> wrote: > > > > > I have a function on a sphere represented in terms of a 3rd order > > > > spherical harmonic (http://www.research.scea.com/gdc2003/spherical- > > > > harmonic-lighting.pdf). This is somewhat similar to how wavelet > > > > compression, such as jpeg, represents a function over a 2d area in > > > > frequency space. I want to find the maximum value of this function > > > > analytically without converting from frequency space. An upper bound > > > > can be easily found by summing the maximum value of all the basis > > > > functions, but this will be a significant over estimate. I don't > > > > really need the exact value, so a more accurate estimate would be > > > > interesting (as well as an exact solution). > > > > Hello Glowkeeper, > > > > There may be some confusion on terminology. The 3rd order Spherical > > > Harmonic (L=3,m=0) is simply sqrt(7/16pi)(5cos(theta)^3 - 3 > > > cos(theta)) > > > > It has a global maximum at theta = 0, and the max is sqrt(7/4pi). > > > > I'm not sure about your comment pertaining summing the maximum values > > > of the basis functions. Did you not know how to handle the two cos > > > terms? > > > > There are of course 7 different standard 3rd order Spherical Harmonic > > > functions, but I gave you the only real valued one. Or do you have an > > > expansion in terms of all 7 3rd order functions? > > > > IHTH, > > > > Clay > > > Clay > > > Yes I expect there is confusion in terminology. I'm no expert with > > Spherical Harmonics and I was taking my terminology from the paper I > > linked to. I am starting with an empirically defined function on a > > sphere, I am then compressing this by representing the function as a > > scaled sum of Spherical Harmonic basis functions. So as you say the > > function is in terms of all the 3rd order basis function, but also the > > 1st and 2nd order functions as well, each function being scaled by a > > constant value. > > > I can see how you can find the maximum of any individual function, in > > just the way you describe, but I want to find the maximum of the > > scaled sum of all the functions. Clearly a much harder problem.- Hide quoted text - > > > - Show quoted text - > > Hello GlowKeeper, > > Do you know if your result is purely real? Try plotting your sum of > Ylm(theta,phi) over [0<=theta<=2pi,0<=phi<=pi] and see where it is > biggest. If your sum is purely real, then you can dispense with the > phi part and just plot theta from 0 to 2pi and see where the max > occurs. You can use a simple bisection or golden ratio method to > easily find the max. > > IHTH, > > Clay- Hide quoted text - > > - Show quoted text -Good suggestion, thanks Clay!