MATLAB: Area of Triangle

areaarea of triangletriangle

Hello, Is there any function to find the area of any triangle using 3D points in cartesian system, where i have the vertices of the triangle in 3d coordinate?
Thanks

Best Answer

According to Wikipedia:
x = rand(3,1);
y = rand(3,1);
z = rand(3,1);
fill3(x,y,z,'r')
x = x(:)';
y = y(:)';
z = z(:)';
ons = [1 1 1];
A = 0.5*sqrt(det([x;y;ons])^2 + det([y;z;ons])^2 + det([z;x;ons])^2)
Grzegorz
Related Question