I have $f(x,y) = \frac{1}{2} (1 - x^2 - y^2)$, which is *a paraboloid centered around the origin* ([plot](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)).


Now I want to calculate the [solid angle](http://en.wikipedia.org/wiki/Solid_angle) (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 $\vec f(x,y) = ( x, y, f(x, y)) = ( x, y, \frac{1 - x^2 - y^2}{2} )$.



> 
> The problem is that I don't know how I convert the Integral over the Surface $\iint\_S dS$ in $\Omega = \iint\_S \frac { \vec{r} \cdot \hat{n} \,dS }{r^3}$ into an Integral over $x$ and $y$: $\int\_X \int\_Y dx dy$.
> 
> 
> 




---


### If I...


...simply replace it with $\int\_{-1}^{1} \int\_{-1}^{1} dx dy$, replacing the other values accordingly with


* each point on the surface: $\vec r = \vec f(x, y) = (x, y, \frac{1 - x^2 - y^2}{2})$,
* normal at each point on the surface: $\hat{n} = \frac{\vec f\_x \times \vec f\_y} {|\vec f\_x \times \vec f\_y|} = (x, y, 1) $ with $\vec f\_x(x, y) = (1, 0, -x)$ and $\vec f\_y(x,y) = (0, 1, -y)$,


I receive
$\Leftrightarrow \int\_x \int\_y \frac{ \vec f(x, y) \cdot (x,y,1) } { |\vec f(x, y)|^3 \cdot |(x, y, 1)|} $


$\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)|}$


$\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}} }$



> 
> If I let [wolframalpha calculate](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)+%2a+(x%5e2+%2b+y%5e2+%2b+1)%5e(1%2f2))+from+x%3d-1+to+1+y%3d-1+to+1&incParTime=true) that, the result is $5.87$.
> 
> 
> 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?
> 
> 
> 




---


### Background


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.



How do you calculate the solid angle of a rectangular, axis aligned section of a surface defined by a two dimensional function?
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.$$


Although, really the two norms just cancel, so you needn't calculate them.


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.$$


This simplifies to 
$$\int\_x \int\_y \frac{4}{(1+x^2+y^2)^2} dx dy.$$


Wolfram[Alpha](http://www.wolframalpha.com/input/?fp=1&i=Integrate+%284%29+%2f+%28%281%2bx%5E2%2by%5E2%29%5E2%29+from+x%3d-1+to+1+y%3d-1+to+1&_=1303938422803&incTime=true) gives the value of this as about 6.96336.


