function x = quad_rst ( r, s, t, i )

%*****************************************************************************80
%
%% quad_rst() evaluates a function of (R,S,T) used for some tests.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 October 2008
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real R, S, T, the (local) coordinates of a point.
%
%    integer I, the component of X to be returned.
%
%  Output:
%
%    real X, the value of the I-th component of X at the point whose
%    local coordinates are (R,S,T).
%
  x = 18.0 * ( r * r + s + t );

  return
end
