function goldrect_test ( )

%*****************************************************************************80
%
%% goldrect_test tests goldrect.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 January 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'goldrect_test\n' );
  fprintf ( 1, '  Plot the golden rectangle.\n' );

  phi = ( 1.0 + sqrt ( 5.0 ) ) / 2.0;
  x = [ 0.0 phi phi 0.0 0.0 ];
  y = [ 0.0 0.0 1.0 1.0 0.0 ];
  u = [ 1.0 1.0 ];
  v = [ 0.0 1.0 ];
  plot ( x, y, 'b', u, v, 'b--' );
  text ( phi/2, 1.05, '\phi' );
  text ( (1.0+phi)/2.0, -0.05, '\phi - 1' );
  text ( -0.05, 0.5, '1' );
  text ( 0.5, -0.05, '1' );
  axis ( 'equal' );
  axis ( 'off' );
  set ( gcf, 'color', 'white' );

  filename = 'goldrect_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
