Compute the unsigned surface area of triangles defined by vertex coordinates. Works with both 2D (xy) and 3D (xyz) input. For 2D input, z coordinates are assumed to be zero.
triangle_surface_area(x)A numeric vector of surface areas, one per triangle.
The area is calculated using the cross product method:
Area = 0.5 * ||(v1 - v0) x (v2 - v0)||
For 2D input, this reduces to the absolute value of the shoelace formula.