area of a triangle in 3d space
I need to calculate the surface area of triangles in 3d space. For a triangle in 2D space it''s just length*height/2. I suppose I could rotate the triangle so that it lies in an axis-aligned plane, and then do length*height/2, but I was wondering if there is just some formula I can use. It would be interesting to see if I can use the plane equation for the plane the triangle lies in to somehow compensate for it not being in an axis-aligned plane.
Proceeding on a brutal rampage is the obvious choice.
you can get the length of the 3 edges of the triangles using pythagoras'' theorem, and from that i''m pretty sure you can calculate the area... yeh?
the surface area can be found while calculating the normal. The length of the normal is the area of the triangle
Vector E(V1 - V0);
Vector F(V2 - V1);
Vector N = E.Cross(F);
float area = N.GetLength();
Vector E(V1 - V0);
Vector F(V2 - V1);
Vector N = E.Cross(F);
float area = N.GetLength();
quote:Original post by oliii
the surface area can be found while calculating the normal. The length of the normal is the area of the triangle
Vector E(V1 - V0);
Vector F(V2 - V1);
Vector N = E.Cross(F);
float area = N.GetLength();
Actually, as Eelco said, it is half this area.
(outer product = cross product)
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
quote:Original post by Afaik
I think it''s also important that this normal is not normalized?
... Obviously...
soz, my mistake, 1/2 the length. And yeah, once you have the length of the edge cross product, you can (and probably should) normalise the normal.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement