function p = triangle_perimeter ( x, y )
%
%  This function computes the perimeter of a triangle.
%
%  The X and Y coordinates of the vertices of a triangle are given
%  in xlist and ylist.
%
  p = 0.0;
  xold = x(3);
  yold = y(3);

  for i = 1 : 3
    p = p + sqrt ( ( x(i) - xold )^2 + ( y(i) - yold )^2 );
    xold = x(i);
    yold = y(i);
  end

  return
end
