function perim = triangle_perimeter ( x, y )

%% TRIANGLE_PERIMETER computes the perimeter of a triangle.
%
%  This function needs to be able to find the "wrap" function.
%
%  X and Y are lists of the X and Y coordinates of the triangle.
%
%  PERIM is the computed perimeter.
%
%  Note that this function is not complete.  The text
%    "distance from x(i),y(i) to x(wrap(i+1)), y(wrap(i+1))"
%  needs to be replaced by the formula for distance of two points.
%  
  perim = 0.0;
  for i = 1 : 3
    perim = perim + distance from x(i),y(i) to x(wrap(i+1)), y(wrap(i+1))
  end

  return
end
