Numerical Integration over 3D mesh

In summary: Integrals over surfaces can be done in a few different ways and each has its own advantages and disadvantages. One way is to use the Laplace transform. Another is the Legendre transform. A third is the Euler–Lagrange transform.The Laplace transform is often more accurate than the other two, but it is more expensive to compute. The Legendre and Euler–Lagrange transforms are both cheaper to compute, but they are not as accurate.
  • #1
thepopasmurf
76
0
Hi, I have a mesh whose surface is made up of tesselating triangles. I would like to perform an integral over this surface of the form

[itex]\int f(\Omega) R(\Omega) d\Omega [/itex]

Where f is an arbitrary function and R is the radius at that point.

I have a method implemented but it is not working correctly. I was wondering if anyone was aware of a better way.

Basically my method is

For each triangular face:

  1. Calculate the value of fR at each vertex of the face
  2. Calculate the average of these three values to find the average value of fR across the face.
  3. Multiply this value by the solid angle covered by the face.
  4. Sum up this result for all of the faces in the mesh.

Unfortunately it doesn't seem to be working as I would have liked. Are there recommended ways of doing this kind of integration?

(This is x-posted in another forum for those who may happened to see both)

Thanks.
 
Physics news on Phys.org
  • #2
I think you need to consult with Messrs. Green and Gauss on this point,and possibly Mr. Stokes as well. Their integral theorems for vector calculus can provide the requisite tools to evaluate your integral.

It's not clear from your description what R(Omega) and the variable Omega represent.
 
  • #3
Omega is the solid angle and d(Omega) is solid angle differential element

[itex]d\Omega = sin\theta d\theta d\phi[/itex]

Although I'm not computing it based on that equation, I'm computing it from the solid angle covered by the triangular element in question using the formula:

[itex]E = (A+B+C) - \pi[/itex]

Where A,B,C are angles of the spherical triangle with the same vertices as the triangle element.

References:

http://en.wikipedia.org/wiki/Solid_angle
http://mathworld.wolfram.com/SphericalTriangle.html
 
  • #4
In your integral you wrote [itex] f(\Omega) R(\Omega)[/itex] which is weird because [itex]\Omega[/itex] isn't actually representing coordinates - is it supposed to be spherical coordinates? And you're projecting out to the mesh or something?

I think a bit more specific description of your integral might help - it's possible that you've forgotten a change of variable Jacobian without realizing it by attempting to write your integral down in a clever way
 
  • #5
Hi thepopasmurf!

thepopasmurf said:
Hi, I have a mesh whose surface is made up of tesselating triangles.
[--.]
For each triangular face:

  1. Calculate the value of fR at each vertex of the face
  2. Calculate the average of these three values to find the average value of fR across the face.
  3. Multiply this value by the solid angle covered by the face.
  4. Sum up this result for all of the faces in the mesh.

Let N be the number of facets of your tess.

You want to approximate
[tex] \int f(\Omega) R(\Omega) d\Omega \approx \frac{1}{3} \sum\limits_{i=1}^{N}{A(S_i) \sum\limits_{j=1}^{3}{f(v_j[S_i])R(v_j[S_i]) }}[/tex]
with [tex]A(S_i)[/tex] denoting the area covered by the i-th Facet and [tex]v_j[S_i][/tex] its j-th vertex?That ansatz looks accurate at a first glance, except I'm not sure
thepopasmurf said:
3. Multiply this value by the solid angle covered by the face.
you did this one accurately; you're aware that the area of the [tex]S_i[/tex] in general depends on the embedding of the surface into the ℝ³, don`t you?

Generally - what is the symptom of the failure you diagnose?Regards, Solkar
 
  • #6
Solkar said:
That ansatz looks accurate at a first glance, except I'm not sure
But not on a second glance, because

thepopasmurf said:
[itex]\int f(\Omega) R(\Omega) d\Omega [/itex] [...] and R is the radius at that point.
it's not R but R² needed.

Thus, there's also a numerical issue, because simply taking the arithmetic mean of the radii of the adjacent vertices can cause a bad estimation.
 
  • #7
@Office_Shredder:

The specific integral I am trying to do is the spherical harmonic integrals,

[itex]a_{vm} = A \int Y_{vm}(\theta, \phi) R(\theta,\phi) sin \theta d\theta d\phi [/itex]

where Y_vm are the spherical harmonic functions and A is a normalisation constant. I used Omega to represent both theta and phi but apparently that convention is not as common as I thought.


@Solkar

it's not R but R² needed.

See my reply to Office_Shredder above, I'm fairly sure it's just R. The symptom of the failure I'm having is that when I try to reconstruct shapes after getting the coefficients there are large errors.
 
  • #8
thepopasmurf said:
I'm fairly sure it's just R.
Then integrate analytically with f = 1 and R = const and reconsider.
 
  • #9
The purpose of the integral is not to find the area, but to find the harmonic coefficients of R.
 
  • #10
But for your numerical integration you need the correct area element.
 
  • #12
That's on a unit sphere so R=R²=1.
 
  • #13
I think it's fine that it's on a unit sphere because the distance part is accounted for in the integrand. And I'm not sure why I would have to add an extra R just because the function is the radius rather than any other function.

Anyway, I think we're getting distracted by this point. I'm ultimately trying to solve this integral as an integral over theta and phi where the values of theta and phi available to me are from a mesh.

If you think I should be using R^2 instead of R could you provide more details as to how I would proceed with that change. One issue I have with this point is that the units change.
 
  • #14
thepopasmurf said:
If you think I should be using R^2 instead of R
It's not question of "thinking" things, but about knowing Lebesgue measure and the foundations of differential geometry.

could you provide more details as to how I would proceed with that change. One issue I have with this point is that the units change.

For your numerics It is advisable to discard the smooth approach for calculating area and simply calculate the area of each triangular facet of your mesh; recall what you learned about cross products for that purpose.
 
  • #15
So should I change my integrand from

[itex]\int Y R d\Omega[/itex]

to

[itex]\int \frac{Y}{R} dA [/itex]

to keep the units correct?
 
  • #16
It's somewhat amazing that people looking for help don't even read the answers given, let alone trying them

This is your thread's title
Numerical Integration over 3D mesh

This is your starting point
Hi, I have a mesh whose surface is made up of tesselating triangles.

and you tried to numerically integrate a function on that by means of generalized Riemann partitioning.

So what by all means should be unclear when I tell you to calculate the area of the tris of your tesselation?
It's a most natural requisite for your integration algorithm, isn't it?
 
  • #17
I'm sorry that this is frustrating for you, but I'm not yet convinced that the area of the triangles is exactly what I want. I'll try to explain my approach in more detail.

I have a mesh of an object made up of triangular faces. I'm trying to get the spherical harmonics components of the mesh

[itex] a_{mn} = \int Y R d\Omega[/itex]

I'm approximating this as

[itex]a_{mn} = \sum Y_{mn} R_{mn} \Delta\Omega[/itex]

Where Delta Omega is a small part of the solid angle. I know that the area is related to this, but this specific integral doesn't seem to require knowing the area directly of the triangular face, it requires knowing how much solid angle it covers.

You could be right, but calculating the area of each triangle isn't useful to me directly. One problem is that the integrand has to be altered to keep the units consistant. So are you also suggesting a change of the integrand when you suggest that I use the area of the triangles?
 
  • #18
thepopasmurf said:
but I'm not yet convinced that the area of the triangles is exactly what I want.
And I'm not yet convinced that you have any clue to what you try to do.
So first better you try to convince me that you're not wasting my time here.
 
Last edited:

Related to Numerical Integration over 3D mesh

1. What is numerical integration over 3D mesh?

Numerical integration over 3D mesh is a mathematical technique used to calculate the value of a triple integral over a three-dimensional mesh or grid. It is commonly used in scientific computing to approximate the value of complex integrals that cannot be solved analytically.

2. How does numerical integration over 3D mesh differ from traditional numerical integration methods?

Numerical integration over 3D mesh differs from traditional numerical integration methods in that it involves dividing the integration domain into smaller sub-domains, or elements, and approximating the integral over each element individually. This allows for a more accurate approximation of the integral, especially for complex functions.

3. What are the advantages of using numerical integration over 3D mesh?

The main advantage of using numerical integration over 3D mesh is its ability to handle complex integrals that cannot be solved analytically. It also allows for a more accurate approximation of the integral compared to traditional numerical integration methods, especially for functions with sharp changes or discontinuities.

4. Are there any limitations to using numerical integration over 3D mesh?

One limitation of using numerical integration over 3D mesh is that it can be computationally intensive, especially for large meshes with a high number of elements. Additionally, the accuracy of the approximation may depend on the size and shape of the elements chosen, and may not always be suitable for highly irregular meshes.

5. In what fields is numerical integration over 3D mesh commonly used?

Numerical integration over 3D mesh is commonly used in fields such as computational fluid dynamics, structural analysis, and electromagnetic simulation. It is also used in other areas of scientific computing, such as image processing and computer graphics, to calculate the volume under a surface or to perform integration over a three-dimensional space.

Similar threads

Replies
3
Views
485
Replies
2
Views
408
Replies
14
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • Quantum Physics
Replies
1
Views
602
  • Differential Geometry
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
711
  • Differential Equations
Replies
3
Views
1K
Replies
3
Views
1K
  • Differential Equations
Replies
6
Views
1K
Back
Top