function v2 = vertex_snap ( v )

%*****************************************************************************80
%
%% vertex_snap() "snaps" a polyiamond described by its vertex list.
%
%  Discussion:
%
%    We "snap" a polyiamond by translating it so that its least I and
%    least J node coordinates are 0.
%
%    The vertex list of a polyiamond gives the IJ coordinates of the
%    polygonal vertices, in counterclockwise order.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 November 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer V(VN,2): the vertex list. 
%
%  Output:
%
%    integer V2(VN,2): the vertex list after snapping.
%
  [ imin, imax, jmin, jmax ] = vertex_range ( v );

  v2 = zeros ( size ( v ) );

  v2(:,1) = v(:,1) - imin;
  v2(:,2) = v(:,2) - jmin;

  return
end

