function rotation_axis2mat_test ( )

%*****************************************************************************80
%
%% ROTATION_AXIS2MAT_TEST tests ROTATION_AXIS2MAT.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    22 May 2005
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ROTATION_AXIS2MAT_TEST\n' );
  fprintf ( 1, '  ROTATION_AXIS2MAT converts a rotation axis to a matrix.\n' );

  v = [ 1.0; 4.0; 10.0 ];
  r8vec_print ( 3, v, '  The vector V:' );

  axis = [ 0.2361737; -0.8814124; -0.4090649 ];
  r8vec_print ( 3, axis, '  The rotation axis:' );

  angle = 1.159804;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The rotation angle is %f\n', angle );

  a = rotation_axis2mat ( axis, angle );

  r8mat_print ( 3, 3, a, '  The rotation matrix A:' );

  w = a * v;

  r8vec_print ( 3, w, '  The rotated vector W = A * V:' );
%
%  Test an axis vector that does not have unit length.
%
  v = [ 1.0; 1.0; 1.0 ];
  r8vec_print ( 3, v, '  The vector V:' );

  axis = [ 0.0; 0.0; 2.0 ];
  r8vec_print ( 3, axis, '  The rotation axis:' );

  angle = 90.0;
  angle = degrees_to_radians ( angle );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The rotation angle is %f\n', angle );

  a = rotation_axis2mat ( axis, angle );

  r8mat_print ( 3, 3, a, '  The rotation matrix A:' );

  w = a * v;

  r8vec_print ( 3, w, '  The rotated vector W = A * V:' );

  return
end
