function area = variomino_area ( p )

%*****************************************************************************80
%
%% variomino_area() returns the area of a variomino.
%
%  Discussion:
%
%    A polyomino is a shape formed by connecting unit squares edgewise
%
%    A variomino is a polyomino in which each square has been assigned
%    a value between 1 and v.
%
%    A variomino can be represented by an MxN matrix, whose entries are
%    between 1 and v for squares that are part of the variomino, 
%    and 0 otherwise.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 April 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer p(mp,np): the matrix representing the variomino.
%
%  Output:
%
%    integer area: the area of the variomino.
%
  area = sum ( sum ( p ~= 0 ) );

  return
end
