• ### What is your GameDev Story?

#### Archived

This topic is now archived and is closed to further replies.

# area of a triangle in 3d space

This topic is 5570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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?

##### Share on other sites
i believe its half the outer product of any two of the triangles edges.

##### Share on other sites
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();

##### Share on other sites
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.

##### Share on other sites
I think it''s also important that this normal is not normalized?

##### Share on other sites
quote:
Original post by Afaik
I think it''s also important that this normal is not normalized?

... Obviously...

##### Share on other sites
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.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634134
• Total Posts
3015751
×