I know this topic is very basic but beside the fact that I find it
very normal, I was wondering if there's a mathematical proof to this ?
The fact that you take 2 sides of triangle (let's call them AB & AC),
compute the cross product of these 2 vectors (ABxAC) and get the
length of the resulting vector, you get the area of the triangle
multiplied by 2.
Area(ABC) = || (AB) x (AC) || / 2
Also I found in this paper
http://www.cimec.org.ar/twiki/pub/Cimec/ComputacionGrafica/triangle_intersection.pdf
page 4 (towards the bottom) that if you take the dot product of the
normalized triangle normal n with the vector that you get from the
cross product of AB with AC you get the length of ABxAC. In other
words:
|| AB x AC || = [AB x AC].n
It works if you code this in a program but i don't know why and can't
figure it out. Could someone explain me please why it is so... it
would be greatly appreciated. Thanks a lot
-coralie
The cross product of vectors A and B is defined (see, e.g.,
http://en.wikipedia.org/wiki/Cross_product) as
A x B = ||A|| ||B|| sin(theta) N,
where theta is the smallest angle between A and B and N is
perpendicular to both A and B. Thus,
||A x B|| = ||A|| ||B|| sin(theta).
Simple trigonometry shows that the height of a triangle with base A
and side B making an angle theta is
h = ||B|| sin(theta)
Thus, Area = (1/2) b h = (1/2) ||A|| ||B|| sin(theta) = (1/2) ||A x
B|| from above.
Dave
Thank you Dave
that does explain the first part well... and i get it now...
But what about the second part. Why does || AB x AC || = [AB x AC].n
where 'n' is the normalized normal of the triangle ? is it related
somehow to the first part ? Because if n is normalized each one its
component indicates the angles between each one of the 3 axes (x, y,
z) ? That's how far I can go but I can't explain it properly...
That would be great if you could or someone else help me on that !
Thank you
-c
So
n = +/- (AB x AC) / |AB x AC|
dot(AB x AC, n)
= dot(AB x AC, (AB x AC) / |AB x AC|)
= dot(AB x AC, AB x AC) / |AB x AC|
= |AB x AC|^2 / |AB x AC|
= |AB x AC|
To generalize, let
dn(u, v) = uAB + vAC
Then
dot(AB x AC, dn(u, v))
= dot(AB x AC, uAB + vAC)
= dot(AB x AC, uAB) + dot(AB x AC, vAC)
= 0
Thus
dot(AB x AC, n + dn(u, v)) = |AB x AC|
for any u and v.
Ha ! Brillant ! Thank you so much for your help everyone ;-)
Have a look here:
Kaba's proof is correct but in the context you mention an un-
normalized normal is used. Anyway, follow the link and read the
explanations on this webpage. It's all explained ...