function to calculate area of triangle
function area ( x1 , y1 , z1 , x2 , y2 , z2 ) { let area = Math . sqrt ( Math . pow ( ( y1 * z2 - y2 * z1 ) , 2 ) + Math . pow ( ( x1 * z2 - x2 * z1 ) , 2 ) + Math . pow ( ( x1 * y2 - x2 * y1 ) , 2 ) ) ; area = area / 2 ; return area ; }