![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le 03.11.2007 11:27, Le Forgeron nous fit lire :
> Area = 1/4*sqrt( (a+b+c)(a+b-c)(b+c-a)(c+b-a) )
That's bogus...
Area = 1/4*sqrt((a+b+c)(a+b-c)(b+c-a)(c+a-b))
Of course!
--
The superior man understands what is right;
the inferior man understands what will sell.
-- Confucius
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le Forgeron <jgr### [at] free fr> wrote:
> On one hand, two vectors differences, a cross product, three
> squaring, a sum and a square root ending with a division.
>
> On the other end, three vectors differences, nine squaring, three
> sums, three square root, an intermediate variable (yet a sum and a
> division), then three differences, a product of four element, and a
> square root.
>
You've been convincing :)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Francesco <nas### [at] gmail com> wrote:
> > > Mesh...are not in the same plane, share no common edges... )
> Don't they share edges? Ok, they are not in the same plane but they share at
> least one edge, or not?
You can create meshes with completely separate, non-touching triangles
which don't share anything.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Francesco" <nas### [at] gmail com> wrote:
> Calculating area triangle per triangle I can always suppose z=0 (translating and
> rotating axis) as triangles are 2D. So I think the formula posted by Penelope20k
> is good.
>
>
> Francesco
YES ! it is not only good but great. it is the shortest route from points to
area I have seen.
just I am not able to mentally make the leap to 3D without a lengthy conversion
to 3 side lengths. If I could, it might be the shortest route in 3D.
also note that 666... is common to all tetra and pyramid volumes?!?
; //e $tetrahedron_volume(383 156 0, 645 254 0, 465 289 0,400 200 200) =
893666.666667
; //e $pyramid_volume(276 308 0, 383 123 0, 666 324 0, 276 308 0, 400 300 200)
= 2462066.666667
I have finished the volume macros
#macro tetrahedron_volume(A,B,C,D)
#local result = abs(vdot(D-A,vcross(D-B,D-C))) / 6
result
#end
#macro pyramid_volume(A,B,C,D,E)
// perimeter order for 1st 4 points
#local result =
tetrahedron_volume(A,B,C,E) + tetrahedron_volume(A,C,D,E);
result
#end
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"alphaQuad" <alp### [at] earthlink net> wrote:
> also note that 666... is common to all tetra and pyramid volumes?!?
no, it was coincidental. or was it synchronicity that keeps getting me.
new users: dont forget the missing ; in that macro
still hope someone will make the leap from Pene's 2d to a short,
or shortEST 3D method
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"alphaQuad" <alp### [at] earthlink net> wrote:
> "Francesco" <nas### [at] gmail com> wrote:
>
> > Calculating area triangle per triangle I can always suppose z=0 (translating and
> > rotating axis) as triangles are 2D. So I think the formula posted by Penelope20k
> > is good.
> >
> >
> > Francesco
>
> YES ! it is not only good but great. it is the shortest route from points to
> area I have seen.
>
> just I am not able to mentally make the leap to 3D without a lengthy conversion
> to 3 side lengths. If I could, it might be the shortest route in 3D.
apparently I am in similiar company as no else can either.
the task:
Area = abs( (xB*yA - xA*yB) + (xC*yB -x B*yC)+( xA*yC - xC*yA ) ) /2
make shortest 3D version
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le 04.11.2007 17:16, alphaQuad nous fit lire :
> apparently I am in similiar company as no else can either.
>
Stop whining... it won't help to get any result.
> the task:
> Area = abs( (xB*yA - xA*yB) + (xC*yB -x B*yC)+( xA*yC - xC*yA ) ) /2
This formula looks bogus.
We already know that
Area = || AB x AC ||
-------------
2
Let's make a numerical application with A(0,-1) B(1,0) and C(0,1)
abs ( (-1 - 0) + (0 - 1) + ( 0 +1 ) ) /2 ---> abs ( -1 ) /2 --> 1/2
(wrong)
AB: <1,1,0>
AC: <0,2,0>
AB x AC: <0,0,-2>
Area = length(AB x AC)/2 = 1. (good!)
>
> make shortest 3D version
The crossproduct is fine, what do you need ?
--
The superior man understands what is right;
the inferior man understands what will sell.
-- Confucius
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le Forgeron <jgr### [at] free fr> wrote:
> Le 04.11.2007 17:16, alphaQuad nous fit lire :
>
> > apparently I am in similiar company as no else can either.
> >
>
> Stop whining... it won't help to get any result.
>
> > the task:
> > Area = abs( (xB*yA - xA*yB) + (xC*yB -x B*yC)+( xA*yC - xC*yA ) ) /2
>
> This formula looks bogus.
>
> We already know that
>
> Area = || AB x AC ||
> -------------
> 2
>
> Let's make a numerical application with A(0,-1) B(1,0) and C(0,1)
>
> abs ( (-1 - 0) + (0 - 1) + ( 0 +1 ) ) /2 ---> abs ( -1 ) /2 --> 1/2
> (wrong)
I get ( (-1 - 0) + (0 - 1) + ( 0 + 0 ) ) /2= -1, which is correct.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le 05.11.2007 21:30, Grassblade nous fit lire :
> Le Forgeron <jgr### [at] free fr> wrote:
>> Le 04.11.2007 17:16, alphaQuad nous fit lire :
>>> the task:
>>> Area = abs( (xB*yA - xA*yB) + (xC*yB -x B*yC)+( xA*yC - xC*yA ) ) /2
>> Let's make a numerical application with A(0,-1) B(1,0) and C(0,1)
>>
>> abs ( (-1 - 0) + (0 - 1) + ( 0 +1 ) ) /2 ---> abs ( -1 ) /2 --> 1/2
>> (wrong)
> I get ( (-1 - 0) + (0 - 1) + ( 0 + 0 ) ) /2= -1, which is correct.
>
Ok, my fault.
So, I let you with alphaQuad trying to generalize that to 3D.
And I will keep using length(crossproduct(B-A,C-A))/2.
--
The superior man understands what is right;
the inferior man understands what will sell.
-- Confucius
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le Forgeron <jgr### [at] free fr> wrote:
> Le 05.11.2007 21:30, Grassblade nous fit lire :
> > Le Forgeron <jgr### [at] free fr> wrote:
> >> Le 04.11.2007 17:16, alphaQuad nous fit lire :
> >>> the task:
> >>> Area = abs( (xB*yA - xA*yB) + (xC*yB -x B*yC)+( xA*yC - xC*yA ) ) /2
>
> >> Let's make a numerical application with A(0,-1) B(1,0) and C(0,1)
> >>
> >> abs ( (-1 - 0) + (0 - 1) + ( 0 +1 ) ) /2 ---> abs ( -1 ) /2 --> 1/2
> >> (wrong)
> > I get ( (-1 - 0) + (0 - 1) + ( 0 + 0 ) ) /2= -1, which is correct.
> >
> Ok, my fault.
>
> So, I let you with alphaQuad trying to generalize that to 3D.
>
> And I will keep using length(crossproduct(B-A,C-A))/2.
>
> --
> The superior man understands what is right;
> the inferior man understands what will sell.
> -- Confucius
I didn't say anything against cross product, did I? It's a useful tool, but it
doesn't work on four or more dimensions. What if I go nuts and want a mesh in
4D?
But to take you up to the task, let's start with the big formula on wikipedia.
With no loss of generality, we can consider A to be in the origin by simply
taking the difference between B and A and C and A. Consequently two of the
determinants are nil, and the square root cancels out with the square. Sarrus'
rule yields: (xB*yC+yB*zC+zB*xC-xB*zC-yB*xC-zB*yC)/2, or
(xB*(yC-zC)+yB*(zC-xC)+zB*(xC-yC))/2. You can reintroduce the coordinates of A
by substitution if you want. I bet that's exactly the same result as the cross
product. :-p
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |