How do you calculate the solid angle of a rectangular, axis aligned section of a surface defined by a two dimensional function? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-24T14:53:08Z http://mathoverflow.net/feeds/question/63129 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/63129/how-do-you-calculate-the-solid-angle-of-a-rectangular-axis-aligned-section-of-a How do you calculate the solid angle of a rectangular, axis aligned section of a surface defined by a two dimensional function? hrehf 2011-04-27T08:36:07Z 2011-04-28T10:05:02Z <p>I have $f(x,y) = \frac{1}{2} (1 - x^2 - y^2)$, which is <em>a paraboloid centered around the origin</em> (<a href="http://www.wolframalpha.com/input/?i=plot+%281+-+x%5E2+-+y%5E2%29+%2F+2+from+x%3D-1+to+1+y%3D-1+to+1" rel="nofollow">plot</a>).</p> <p>Now I want to calculate the <a href="http://en.wikipedia.org/wiki/Solid_angle" rel="nofollow">solid angle</a> (with the origin as the viewpoint) of the surface area defined by f(x,y) with a rectangular, axis aligned section of the xy plane as its input, e.g. $-1 \leq x \leq 1$ and $-1 \leq y \leq 1$. So each point of the surface area has the coordinates <code>$\vec f(x,y) = ( x, y, f(x, y)) = ( x, y, \frac{1 - x^2 - y^2}{2} )$</code>.</p> <blockquote> <p>The problem is that I don't know how I convert the Integral over the Surface $\iint_S dS$ in <code>$\Omega = \iint_S \frac { \vec{r} \cdot \hat{n} \,dS }{r^3}$</code> into an Integral over $x$ and $y$: $\int_X \int_Y dx dy$.</p> </blockquote> <hr> <h3>If I...</h3> <p>...simply replace it with $\int_{-1}^{1} \int_{-1}^{1} dx dy$, replacing the other values accordingly with</p> <ul> <li>each point on the surface: <code>$\vec r = \vec f(x, y) = (x, y, \frac{1 - x^2 - y^2}{2})$</code>,</li> <li>normal at each point on the surface: <code>$\hat{n} = \frac{\vec f_x \times \vec f_y} {|\vec f_x \times \vec f_y|} = (x, y, 1)$</code> with <code>$\vec f_x(x, y) = (1, 0, -x)$</code> and <code>$\vec f_y(x,y) = (0, 1, -y)$</code>,</li> </ul> <p>I receive <code>$\Leftrightarrow \int_x \int_y \frac{ \vec f(x, y) \cdot (x,y,1) } { |\vec f(x, y)|^3 \cdot |(x, y, 1)|}$</code></p> <p><code>$\Leftrightarrow \int_x \int_y \frac{ (x, y, \frac{1 - x^2 - y^2}{2}) \cdot (x, y 1)} {|(x, y, \frac{1 - x^2 - y^2}{2})|^3 \cdot |(x, y, 1)|}$</code></p> <p><code>$\Leftrightarrow \int_x \int_y \frac{ x^2 + y^2 + \frac{1 - x^2 - y^2}{2} } { ( x^2 + y^2 + (\frac{1 - x^2 - y^2}{2})^2)^{\frac{3}{2}} \cdot (x^2 + y^2 + 1)^{\frac{1}{2}} }$</code></p> <blockquote> <p>If I let wolframalpha calculate[1] that, the result is $5.87$.</p> <p>This is clearly wrong though, because the paraboloid covers more than the hemisphere, and thus needs to have a solid angle of more than $2\pi$. So what do I need to change?</p> </blockquote> <hr> <h3>Background</h3> <p>I'm using this paraboloid as a mapping to project geometry into a texture, and for the next step I need to find out what portion of the hemisphere each pixel covers. So ideally I need a way to calculate this as fast as possible - I might need to search for a similar, faster function for actual usage.</p> <p>[1] <a href="http://www.wolframalpha.com/input/?i=Integrate+(x%5e2+%2b+y%5e2+%2b+(1-x%5e2-y%5e2)%2f2)+%2f+((x%5e2+%2b+y%5e2+%2b+((1-x%5e2-y%5e2)%2f2)%5e2)%5e(3%2f2)+" rel="nofollow">http://www.wolframalpha.com/input/?i=Integrate+(x%5e2+%2b+y%5e2+%2b+(1-x%5e2-y%5e2)%2f2)+%2f+((x%5e2+%2b+y%5e2+%2b+((1-x%5e2-y%5e2)%2f2)%5e2)%5e(3%2f2)+</a>*+(x%5e2+%2b+y%5e2+%2b+1)%5e(1%2f2))+from+x%3d-1+to+1+y%3d-1+to+1&amp;incParTime=true</p> http://mathoverflow.net/questions/63129/how-do-you-calculate-the-solid-angle-of-a-rectangular-axis-aligned-section-of-a/63159#63159 Answer by Joseph O'Rourke for How do you calculate the solid angle of a rectangular, axis aligned section of a surface defined by a two dimensional function? Joseph O'Rourke 2011-04-27T12:27:13Z 2011-04-27T12:27:13Z <p>This is not an answer, just another way of viewing the calculation. You need only compute the area of the roughly one-eighth of the sphere that falls below the equator (green below) and beneath the line formed by the origin and the curve $(x,1,-x^2 /2)$ for $x\in[-1,1]$, tracing out one boundary curve. The portion outside your solid angle is composed of four of these regions. <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://cs.smith.edu/~orourke/MathOverflow/SolidAngle.jpg" alt="SolidAngle"></p> http://mathoverflow.net/questions/63129/how-do-you-calculate-the-solid-angle-of-a-rectangular-axis-aligned-section-of-a/63184#63184 Answer by Christian Blatter for How do you calculate the solid angle of a rectangular, axis aligned section of a surface defined by a two dimensional function? Christian Blatter 2011-04-27T15:06:19Z 2011-04-28T10:05:02Z <p>The normal to the paraboloid plays no role in this. A "surface element" ${\rm d}(x,y)$ at the point $(x,y)$ in the $(x,y)$-parameter plane produces via $\vec f$ (or rather $\vec f_*$) a surface element $dS$ at the point $\vec f(x,y)$ on your paraboloid $S$, and then this surface element $dS$ casts a shadow $d\omega$ on the unit sphere $S^2$ through central projection from $O$, i.e., via normalization of $\vec f$. Since $$|\vec f(x,y)|^2=x^2+y^2+{1\over4}(1-x^2-y^2)^2={1\over4}(1+x^2+y^2)^2$$ it follows that the shadow on $S^2$ is produced by the map $$\vec g: \quad (x,y) \mapsto {2\over 1+x^2+y^2} \bigl(x,y,{1\over2}(1-x^2-y^2)\bigr)\ .$$ This $\vec g$ is nothing else but an (unusual) parametric representation of $S^2$. In order to compute the area of the shadowed part of $S^2$ one has to compute $d\omega=|g_x\times g_y|{\rm d}(x,y)$ and to integrate this over the intended rectangle in the $(x,y)$-plane.</p> <p>The computation gives, as already remarked by Ben, $$d\omega={4\over(1+x^2+y^2)^2}{\rm d}(x,y)\ .$$ Transforming to polar coordinates one finds for the $[-1,1]^2$-rectangle the exact value $8\sqrt 2\ \arctan(1/\sqrt 2)\doteq 6.96366$.</p> http://mathoverflow.net/questions/63129/how-do-you-calculate-the-solid-angle-of-a-rectangular-axis-aligned-section-of-a/63231#63231 Answer by Ben Willson for How do you calculate the solid angle of a rectangular, axis aligned section of a surface defined by a two dimensional function? Ben Willson 2011-04-27T21:21:13Z 2011-04-27T21:21:13Z <p>You need to include the differential surface area in your parametrized version of the integral. In effect, you replace the $\hat{n} dS$ term with $$\frac{\vec{f}_x\times\vec{f}_y}{\|\vec{f}_x\times\vec{f}_y\|} {\|\vec{f}_x\times\vec{f}_y\|} dxdy.$$</p> <p>Although, really the two norms just cancel, so you needn't calculate them.</p> <p>Your integral then becomes $$\int_x \int_y \frac{( x,y,\frac{1-x^2-y^2}{2})}{(x^2+y^2+(\frac{1-x^2-y^2}{2})^2)^{(3/2)}}\cdot( x,y,1) dx dy.$$</p> <p>This simplifies to $$\int_x \int_y \frac{4}{(1+x^2+y^2)^2} dx dy.$$</p> <p>Wolfram<a href="http://www.wolframalpha.com/input/?fp=1&amp;i=Integrate+%25284%2529+%252f+%2528%25281%252bx%5E2%252by%5E2%2529%5E2%2529+from+x%253d-1+to+1+y%253d-1+to+1&amp;_=1303938422803&amp;incTime=true" rel="nofollow">Alpha</a> gives the value of this as about 6.96336.</p>