function area = triangle_area_3d ( t )

  dim_num = 3;

  cross(1) = ( t(2,2) - t(2,1) ) * ( t(3,3) - t(3,1) ) ...
           - ( t(3,2) - t(3,1) ) * ( t(2,3) - t(2,1) );

  cross(2) = ( t(3,2) - t(3,1) ) * ( t(1,3) - t(1,1) ) ...
           - ( t(1,2) - t(1,1) ) * ( t(3,3) - t(3,1) );

  cross(3) = ( t(1,2) - t(1,1) ) * ( t(2,3) - t(2,1) ) ...
           - ( t(2,2) - t(2,1) ) * ( t(1,3) - t(1,1) );

  area = 0.5 * sqrt ( sum ( cross(1:dim_num).^2 ) );
