Re: surface integration using unsorted numerical data



yiannis p <yiannis000@xxxxxxxxxxx> wrote in message
<8173673.1210241162728.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxx>...
Thank you John

You have been very helpful.
I have one question though as to which numerical method you are using for
the summation and what is it calculates for avez.

Lets see if I can give a simple explanation...

This works by effectively transforming each
triangle to an equilateral one. This comes
from the computation of A - a determinant
that computes the area of each triangle. As
it turns out, that determinant is also the
determinant of the Jacobian matrix needed
for the implicit change of variables.

Then I multiply by the average of the z values
at each corner node, which would be correct
were each triangle truly equilateral. Sum up
the areas over all triangles in the triangulation,
and you are done. Its all neatly vectorized of
course.

% Compute the areas of each triangle in tri.
A = abs((xy(tri(:,2),1)-xy(tri(:,1),1)).*(xy(tri(:,3),2)-xy(tri(:,1),2)) - ...
(xy(tri(:,3),1)-xy(tri(:,1),1)).*(xy(tri(:,2),2)-xy(tri(:,1),2)))/2;

avez = z(tri(:,1)) + z(tri(:,2)) + z(tri(:,3));
integral = sum(A.* avez/3)

John
.



Relevant Pages

  • Re: area of a triangle determinant
    ... >My computational geometry book shows how you can find the area of a triangle ... >defined by 3 vertices using the cross product. ... >I understand how he shows the determinant and cross porduct way are the same ... operations and column operations on determinants, ...
    (sci.math)
  • Re: Delaunay: Determinant test
    ... have seens statements to the effect that "If the determinant D = ... ... I can get this up and running as far as one triangle goes: ... only if D lies within the circumcircle of triangle ABC. ... Now based on whether or not D lies inside the circumcircle, ...
    (comp.graphics.algorithms)
  • Re: Identifying edges in a triangle?
    ... I am trying to find a way to identify if L1 is a leftedge of if it a rightedge, but cannot seem to find a correct strict criteria. ... For example, if one side of the triangle is horizontal, then you have two sides of the triangle that can be qualified as L1. ... Then compute the determinant of the 2x2 matrix ... The sign indicates the orientation, and orientation is an artifact of the coordinate system you chose. ...
    (sci.math)
  • Re: Identifying edges in a triangle?
    ... I am trying to find a way to identify if L1 is a leftedge of if it a rightedge, but cannot seem to find a correct strict criteria. ... For example, if one side of the triangle is horizontal, then you have two sides of the triangle that can be qualified as L1. ... Then compute the determinant of the 2x2 matrix ...
    (sci.math)
  • A new conjecture about primes?
    ... sequential order until a triangle number is produced. ... When summation values at any point in the summation it ... produces a triangle number < kl then is composite. ... and are all trivial factorizations using triangle number factoring. ...
    (sci.math)