• Create Account

## Spherical Harmonics comparison

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1Shirakana2  Members

500
Like
0Likes
Like

Posted 23 March 2012 - 03:44 PM

Hi all,

I'd like to know if there is a correct way to compare 2 spherical harmonics: I have a set of SH (3rd order = 9 coefs) and - for a given SH - I'd like to find out which SH in the set are "similar" to the given one.

I did a basic L2 distance on coefs set but it is obviously not correct, and I have no idea of which value my threshold should have.

I guess there's already smart solution for this problem but my friend google doesn't know where to look.

Any suggestions ?
Some of my previous work on my personal webpage

### #2Buzzy  Members

312
Like
2Likes
Like

Posted 23 March 2012 - 07:25 PM

You could take the difference between the coefficients of the two, then integrate over the sphere with these new coefficients, but using the absolute value of the function, to get the L1 distance. To integrate I'd say probably just do a basic Monte Carlo integration by having a set of a few dozen or so points on the unit sphere that you can plug into the resulting difference SH function. This should work because the L1 distance between two functions is something like

where and

Here, c and d are your coefficients, and the y's are the SH basis functions. So a Monte Carlo integration would be something like

for a set of N points (uniformly distributed) on the unit sphere. Here w(x) is a weight function, which would be equal to 4pi if you use a uniform distribution on the sphere.

You could also replace taking the absolute value with an L2 norm to get the L2 distance. I think I got all that right... hope that helps.

--Buzzy

### #3Shirakana2  Members

500
Like
0Likes
Like

Posted 26 March 2012 - 08:41 AM

It helps a lot !
Many thanks.
--
Some of my previous work on my personal webpage

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.