Thread: RE: [Algorithms] Solid angle calculation
Brought to you by:
vexxed72
From: Tom F. <to...@mu...> - 2002-09-16 11:55:00
|
I assumed that was a typo, and they mean "sine(theta)". But I didn't worry about it too hard since, using cube-maps and just ignoring the spherical distortion (i.e. every sample is evenly weighted) seemed to work just fine - at least to within the tolerance of my eye :-). It also bins all the angle stuff and uses the SH components directly (since you already have x,y,z to plug into the component calculations), so there's no trig anywhere in any equations. Which is very good news for speed. Tom Forsyth - purely hypothetical Muckyfoot bloke. This email is the product of your deranged imagination, and does not in any way imply existence of the author. > -----Original Message----- > From: Joris Mans [mailto:jor...@pa...] > Sent: 12 September 2002 02:17 > To: gda...@li... > Subject: [Algorithms] Solid angle calculation > > > Hi > > I am currently trying to understand/implement the integration scheme > used in "An efficient rep. for Irradiance env maps" and I > think my math > skills have some holes in them, because I don't understand the formula > for calculating the solid angle. > This is the c sample code: > > domega = (2*PI/width)*(2*PI/width)*sinc(theta) ; > > I understand where the / width comes from since you are integrating in > steps of 1/width over the sphere, but I fail to understand what > sinc(theta) means. > > FYI: > > float sinc(float x) { /* Supporting sinc function */ > if (fabs(x) < 1.0e-4) return 1.0 ; > else return(sin(x)/x) ; > } > > How does this term calculate the solid angle? > > Thanks > > Joris > > > > ------------------------------------------------------- > In remembrance > www.osdn.com/911/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > |
From: Nick P. <NPe...@cl...> - 2002-09-18 10:42:45
|
sinc() is actually a well-known maths function, and is often used in code for rescaling / resampling. Search for "sinc function" on Google, and you'll hit loads of maths sites explaining it, such as: http://mathworld.wolfram.com/SincFunction.html Cheers, .....Nick Pelling..... -----Original Message----- From: Tom Forsyth [mailto:to...@mu...] Sent: 16 September 2002 12:51 To: Joris Mans; gda...@li... Subject: RE: [Algorithms] Solid angle calculation I assumed that was a typo, and they mean "sine(theta)". But I didn't worry about it too hard since, using cube-maps and just ignoring the spherical distortion (i.e. every sample is evenly weighted) seemed to work just fine - at least to within the tolerance of my eye :-). It also bins all the angle stuff and uses the SH components directly (since you already have x,y,z to plug into the component calculations), so there's no trig anywhere in any equations. Which is very good news for speed. Tom Forsyth - purely hypothetical Muckyfoot bloke. This email is the product of your deranged imagination, and does not in any way imply existence of the author. > -----Original Message----- > From: Joris Mans [mailto:jor...@pa...] > Sent: 12 September 2002 02:17 > To: gda...@li... > Subject: [Algorithms] Solid angle calculation > > > Hi > > I am currently trying to understand/implement the integration scheme > used in "An efficient rep. for Irradiance env maps" and I > think my math > skills have some holes in them, because I don't understand the formula > for calculating the solid angle. > This is the c sample code: > > domega = (2*PI/width)*(2*PI/width)*sinc(theta) ; > > I understand where the / width comes from since you are integrating in > steps of 1/width over the sphere, but I fail to understand what > sinc(theta) means. > > FYI: > > float sinc(float x) { /* Supporting sinc function */ > if (fabs(x) < 1.0e-4) return 1.0 ; > else return(sin(x)/x) ; > } > > How does this term calculate the solid angle? > > Thanks > > Joris > > > > ------------------------------------------------------- > In remembrance > www.osdn.com/911/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 |
From: Joris M. <jor...@pa...> - 2002-09-18 11:18:59
|
Ok, I understand that, but I fail to see how this function can be used to calculate the differential solid angle as the formulae found on the net do not use sinc for that. Does anyone know? Joris > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...] On > Behalf Of Nick Pelling > Sent: Wednesday, September 18, 2002 12:42 PM > To: gda...@li... > Subject: RE: [Algorithms] Solid angle calculation > > > sinc() is actually a well-known maths function, and is often > used in code for rescaling / resampling. > > Search for "sinc function" on Google, and you'll hit loads of > maths sites explaining it, such as: > > http://mathworld.wolfram.com/SincFunction.html > > Cheers, .....Nick Pelling..... > > -----Original Message----- > From: Tom Forsyth [mailto:to...@mu...] > Sent: 16 September 2002 12:51 > To: Joris Mans; gda...@li... > Subject: RE: [Algorithms] Solid angle calculation > > > I assumed that was a typo, and they mean "sine(theta)". But I > didn't worry about it too hard since, using cube-maps and > just ignoring the spherical distortion (i.e. every sample is > evenly weighted) seemed to work just fine - at least to > within the tolerance of my eye :-). It also bins all the > angle stuff and uses the SH components directly (since you > already have x,y,z to plug into the component calculations), > so there's no trig anywhere in any equations. Which is very > good news for speed. > > > Tom Forsyth - purely hypothetical Muckyfoot bloke. > > This email is the product of your deranged imagination, > and does not in any way imply existence of the author. > > > -----Original Message----- > > From: Joris Mans [mailto:jor...@pa...] > > Sent: 12 September 2002 02:17 > > To: gda...@li... > > Subject: [Algorithms] Solid angle calculation > > > > > > Hi > > > > I am currently trying to understand/implement the > integration scheme > > used in "An efficient rep. for Irradiance env maps" and I think my > > math skills have some holes in them, because I don't understand the > > formula for calculating the solid angle. > > This is the c sample code: > > > > domega = (2*PI/width)*(2*PI/width)*sinc(theta) ; > > > > I understand where the / width comes from since you are > integrating in > > steps of 1/width over the sphere, but I fail to understand what > > sinc(theta) means. > > > > FYI: > > > > float sinc(float x) { /* Supporting sinc function */ > > if (fabs(x) < 1.0e-4) return 1.0 ; > > else return(sin(x)/x) ; > > } > > > > How does this term calculate the solid angle? > > > > Thanks > > > > Joris > > > > > > > > ------------------------------------------------------- > > In remembrance > > www.osdn.com/911/ _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > GDAlgorithms-list mailing list GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > ------------------------------------------------------- > This SF.NET email is sponsored by: AMD - Your access to the > experts on Hammer Technology! Open Source & Linux Developers, > register now for the AMD Developer Symposium. Code: EX8664 > http://www.developwithamd.com/developerlab > > _______________________________________________ > GDAlgorithms-list mailing list GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > |
From: Joris M. <jor...@pa...> - 2002-09-18 11:49:10
|
Here ya go http://graphics.stanford.edu/papers/envmap/prefilter.c > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...] On > Behalf Of Joris Mans > Sent: Wednesday, September 18, 2002 1:19 PM > To: 'Nick Pelling'; gda...@li... > Subject: RE: [Algorithms] Solid angle calculation > > > Ok, I understand that, but I fail to see how this function > can be used to calculate the differential solid angle as the > formulae found on the net do not use sinc for that. > > Does anyone know? > > Joris > > > -----Original Message----- > > From: gda...@li... > > [mailto:gda...@li...] On > > Behalf Of Nick Pelling > > Sent: Wednesday, September 18, 2002 12:42 PM > > To: gda...@li... > > Subject: RE: [Algorithms] Solid angle calculation > > > > > > sinc() is actually a well-known maths function, and is often > > used in code for rescaling / resampling. > > > > Search for "sinc function" on Google, and you'll hit loads of > > maths sites explaining it, such as: > > > > http://mathworld.wolfram.com/SincFunction.html > > > > Cheers, .....Nick Pelling..... > > > > -----Original Message----- > > From: Tom Forsyth [mailto:to...@mu...] > > Sent: 16 September 2002 12:51 > > To: Joris Mans; gda...@li... > > Subject: RE: [Algorithms] Solid angle calculation > > > > > > I assumed that was a typo, and they mean "sine(theta)". But I > > didn't worry about it too hard since, using cube-maps and > > just ignoring the spherical distortion (i.e. every sample is > > evenly weighted) seemed to work just fine - at least to > > within the tolerance of my eye :-). It also bins all the > > angle stuff and uses the SH components directly (since you > > already have x,y,z to plug into the component calculations), > > so there's no trig anywhere in any equations. Which is very > > good news for speed. > > > > > > Tom Forsyth - purely hypothetical Muckyfoot bloke. > > > > This email is the product of your deranged imagination, > > and does not in any way imply existence of the author. > > > > > -----Original Message----- > > > From: Joris Mans [mailto:jor...@pa...] > > > Sent: 12 September 2002 02:17 > > > To: gda...@li... > > > Subject: [Algorithms] Solid angle calculation > > > > > > > > > Hi > > > > > > I am currently trying to understand/implement the > > integration scheme > > > used in "An efficient rep. for Irradiance env maps" and I think my > > > math skills have some holes in them, because I don't > understand the > > > formula for calculating the solid angle. > > > This is the c sample code: > > > > > > domega = (2*PI/width)*(2*PI/width)*sinc(theta) ; > > > > > > I understand where the / width comes from since you are > > integrating in > > > steps of 1/width over the sphere, but I fail to understand what > > > sinc(theta) means. > > > > > > FYI: > > > > > > float sinc(float x) { /* Supporting sinc function */ > > > if (fabs(x) < 1.0e-4) return 1.0 ; > > > else return(sin(x)/x) ; > > > } > > > > > > How does this term calculate the solid angle? > > > > > > Thanks > > > > > > Joris > > > > > > > > > > > > ------------------------------------------------------- > > > In remembrance > > > www.osdn.com/911/ _______________________________________________ > > > GDAlgorithms-list mailing list > > > GDA...@li... > > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > GDAlgorithms-list mailing list > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: AMD - Your access to the > > experts on Hammer Technology! Open Source & Linux Developers, > > register now for the AMD Developer Symposium. Code: EX8664 > > http://www.developwithamd.com/developerlab > > > > _______________________________________________ > > GDAlgorithms-list mailing list > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: AMD - Your access to the experts > on Hammer Technology! Open Source & Linux Developers, register now > for the AMD Developer Symposium. Code: EX8664 > http://www.developwithamd.com/developerlab > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > |
From: Tom F. <to...@mu...> - 2002-09-18 11:02:58
|
We know what sinc _is_ - Joris even gave the code for it. The question is why is it being used here? Tom Forsyth - purely hypothetical Muckyfoot bloke. This email is the product of your deranged imagination, and does not in any way imply existence of the author. > -----Original Message----- > From: Nick Pelling [mailto:NPe...@cl...] > Sent: 18 September 2002 11:42 > To: gda...@li... > Subject: RE: [Algorithms] Solid angle calculation > > > sinc() is actually a well-known maths function, and is often > used in code > for rescaling / resampling. > > Search for "sinc function" on Google, and you'll hit loads of > maths sites > explaining it, such as: > > http://mathworld.wolfram.com/SincFunction.html > > Cheers, .....Nick Pelling..... > > -----Original Message----- > From: Tom Forsyth [mailto:to...@mu...] > Sent: 16 September 2002 12:51 > To: Joris Mans; gda...@li... > Subject: RE: [Algorithms] Solid angle calculation > > > I assumed that was a typo, and they mean "sine(theta)". But I > didn't worry > about it too hard since, using cube-maps and just ignoring > the spherical > distortion (i.e. every sample is evenly weighted) seemed to > work just fine - > at least to within the tolerance of my eye :-). It also bins > all the angle > stuff and uses the SH components directly (since you already > have x,y,z to > plug into the component calculations), so there's no trig > anywhere in any > equations. Which is very good news for speed. > > > Tom Forsyth - purely hypothetical Muckyfoot bloke. > > This email is the product of your deranged imagination, > and does not in any way imply existence of the author. > > > -----Original Message----- > > From: Joris Mans [mailto:jor...@pa...] > > Sent: 12 September 2002 02:17 > > To: gda...@li... > > Subject: [Algorithms] Solid angle calculation > > > > > > Hi > > > > I am currently trying to understand/implement the integration scheme > > used in "An efficient rep. for Irradiance env maps" and I > > think my math > > skills have some holes in them, because I don't understand > the formula > > for calculating the solid angle. > > This is the c sample code: > > > > domega = (2*PI/width)*(2*PI/width)*sinc(theta) ; > > > > I understand where the / width comes from since you are > integrating in > > steps of 1/width over the sphere, but I fail to understand what > > sinc(theta) means. > > > > FYI: > > > > float sinc(float x) { /* Supporting sinc function */ > > if (fabs(x) < 1.0e-4) return 1.0 ; > > else return(sin(x)/x) ; > > } > > > > How does this term calculate the solid angle? > > > > Thanks > > > > Joris > > > > > > > > ------------------------------------------------------- > > In remembrance > > www.osdn.com/911/ > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > ------------------------------------------------------- > This SF.NET email is sponsored by: AMD - Your access to the experts > on Hammer Technology! Open Source & Linux Developers, register now > for the AMD Developer Symposium. Code: EX8664 > http://www.developwithamd.com/developerlab > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > |
From: Nick P. <NPe...@cl...> - 2002-09-18 11:40:34
|
In their prefilter() routine, the authors calculate theta as the angle from the normal to the (u,v) plane. That's the solid angle... that's all. The sinc() function is then using that solid angle to do the resampling. As I flagged, it's pretty useful for that kind of thing. It seems pretty simple. Cheers, ....Nick Pelling.... -----Original Message----- From: Joris Mans [mailto:jor...@pa...] Sent: 18 September 2002 12:19 To: 'Nick Pelling'; gda...@li... Subject: RE: [Algorithms] Solid angle calculation Ok, I understand that, but I fail to see how this function can be used to calculate the differential solid angle as the formulae found on the net do not use sinc for that. Does anyone know? Joris > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...] On > Behalf Of Nick Pelling > Sent: Wednesday, September 18, 2002 12:42 PM > To: gda...@li... > Subject: RE: [Algorithms] Solid angle calculation > > > sinc() is actually a well-known maths function, and is often > used in code for rescaling / resampling. > > Search for "sinc function" on Google, and you'll hit loads of > maths sites explaining it, such as: > > http://mathworld.wolfram.com/SincFunction.html > > Cheers, .....Nick Pelling..... > > -----Original Message----- > From: Tom Forsyth [mailto:to...@mu...] > Sent: 16 September 2002 12:51 > To: Joris Mans; gda...@li... > Subject: RE: [Algorithms] Solid angle calculation > > > I assumed that was a typo, and they mean "sine(theta)". But I > didn't worry about it too hard since, using cube-maps and > just ignoring the spherical distortion (i.e. every sample is > evenly weighted) seemed to work just fine - at least to > within the tolerance of my eye :-). It also bins all the > angle stuff and uses the SH components directly (since you > already have x,y,z to plug into the component calculations), > so there's no trig anywhere in any equations. Which is very > good news for speed. > > > Tom Forsyth - purely hypothetical Muckyfoot bloke. > > This email is the product of your deranged imagination, > and does not in any way imply existence of the author. > > > -----Original Message----- > > From: Joris Mans [mailto:jor...@pa...] > > Sent: 12 September 2002 02:17 > > To: gda...@li... > > Subject: [Algorithms] Solid angle calculation > > > > > > Hi > > > > I am currently trying to understand/implement the > integration scheme > > used in "An efficient rep. for Irradiance env maps" and I think my > > math skills have some holes in them, because I don't understand the > > formula for calculating the solid angle. > > This is the c sample code: > > > > domega = (2*PI/width)*(2*PI/width)*sinc(theta) ; > > > > I understand where the / width comes from since you are > integrating in > > steps of 1/width over the sphere, but I fail to understand what > > sinc(theta) means. > > > > FYI: > > > > float sinc(float x) { /* Supporting sinc function */ > > if (fabs(x) < 1.0e-4) return 1.0 ; > > else return(sin(x)/x) ; > > } > > > > How does this term calculate the solid angle? > > > > Thanks > > > > Joris > > > > > > > > ------------------------------------------------------- > > In remembrance > > www.osdn.com/911/ _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > GDAlgorithms-list mailing list GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > ------------------------------------------------------- > This SF.NET email is sponsored by: AMD - Your access to the > experts on Hammer Technology! Open Source & Linux Developers, > register now for the AMD Developer Symposium. Code: EX8664 > http://www.developwithamd.com/developerlab > > _______________________________________________ > GDAlgorithms-list mailing list GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > |
From: <Ber...@ma...> - 2002-09-18 11:53:54
|
> > > domega = (2*PI/width)*(2*PI/width)*sinc(theta) ; > > > > > > I understand where the / width comes from since you are > > integrating in > > > steps of 1/width over the sphere, but I fail to understand what > > > sinc(theta) means. > We know what sinc _is_ - Joris even gave the code for it. The > question is > why is it being used here? On a hunch : because they are using proper monte carlo integration around (rather than just taking a single point sample at) the angle of interest, during which they use the sync as a lowpass filter to remove frequencies beyond the nyquist limit ? So that would basically be a misleading name -- it's not just the differential angle required by the numerical integration, it's also carrying the value of the filter being convolved with. I would expect to see a double loop, whereas the net samples you mention that don't use sinc, only have one loop. Or maybe not :) Bert |
From: Peter-Pike S. <pp...@mi...> - 2002-09-18 18:00:33
|
I believe this is just the differential solid angle for the sphere map parameterization. Using sin(theta) would only be correct for a lat/long parameterization... -Peter-Pike (I don't think this has anything to do with low pass filters...) -----Original Message----- From: Ber...@ma... [mailto:Ber...@ma...]=20 Sent: Wednesday, September 18, 2002 4:48 AM To: gda...@li... Subject: RE: [Algorithms] Solid angle calculation > > > domega =3D (2*PI/width)*(2*PI/width)*sinc(theta) ; > > >=20 > > > I understand where the / width comes from since you are > > integrating in > > > steps of 1/width over the sphere, but I fail to understand what > > > sinc(theta) means. > We know what sinc _is_ - Joris even gave the code for it. The > question is > why is it being used here? On a hunch : because they are using proper monte carlo integration around (rather than just taking a single point=20 sample at) the angle of interest, during which they use the sync as a lowpass filter to remove frequencies=20 beyond the nyquist limit ? So that would basically be a misleading name -- it's not just the differential angle required by the numerical integration, it's also carrying the value of the filter being convolved with. I would expect to see a double loop, whereas the net samples you mention that don't use sinc, only have one loop. Or maybe not :) Bert ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 |