area of a triangle in 3d space

Started by
6 comments, last by amish1234 20 years, 5 months ago
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.
___________________________________________________________Where to find the intensity (Updated Dec 28, 2004)Member of UBAAG (Unban aftermath Association of Gamedev)
Advertisement
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?
i believe its half the outer product of any two of the triangles edges.
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();

Everything is better with Metal.

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.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
I think it''s also important that this normal is not normalized?
quote:Original post by Afaik
I think it''s also important that this normal is not normalized?


... Obviously...

Looking for a serious game project?
www.xgameproject.com
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.

Everything is better with Metal.

This topic is closed to new replies.

Advertisement