Hello Everyone,
I calculated the charge density over a plane with a finite element method , so I get a function like sigma=f[x,y].
Now I need to integrate the charge over a finite area (electrode) in order to calculate the collected charge by the electrode. The electrode has a closed polygonal contour like the example below:
In[267]:= fff
Out[267]= {{-6.17, -33.75}, {-9.35, -33.75}, {-9.35, -33.78}, {-9.35, \
-39.375}, {-9.35, -45.435}, {-9.35, -45.45}, {-9.22, -45.45}, {-9.22, \
-39.375}, {-6.17, -39.375}, {-6.17, -33.78}, {-6.17, -33.75}}
I think need to define a Boole function that is True when a point {x,y} belongs to the interior of the closed polygonal contour in order to Integrate f[x,y] as showed in the On line help:
Integrals over Regions
This does an integral over the interior of the unit circle.
In[1]:= Integrate[If[x^2 + y^2 < 1, 1, 0], {x, -1, 1}, {y, -1, 1}]
Out[1]= \[Pi]
Here is an equivalent form.
In[2]:= Integrate[Boole[x^2 + y^2 < 1], {x, -1, 1}, {y, -1, 1}]
Out[2]= \[Pi]
So my question is: what is the simplest way to express the fact that the current point {x,y} is inside my polygonal region (can be non-convex) ?
Thanks for your suggestions
Christian