function v = polygon_minkowski_to_vertices ( u )

%*****************************************************************************80
%
%% polygon_minkowski_to_vertices() computes vertices from a Minkowski representation.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 November 2024
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real u(n,2): the Minkowski polygon representation.
%
%  Output:
%
%    real v(n,2): the polygon vertices.
%
  nu = size ( u, 1 );

  nv = nu + 1;
  v = zeros ( nv, 2 );

% for iv = 1 : nv - 1
  for iv = 1 : nv
    if ( iv == 1 )
      v(iv,1:2) = [ 0.0, 0.0 ];
    else
      v(iv,1:2) = v(iv-1,1:2) + [ - u(iv-1,2), u(iv-1,1) ];
    end
  end

  return
end

