function rotation_axis2quat_test ( )

%*****************************************************************************80
%
%% rotation_axis2quat_test() tests ROTATION_AXIS2QUAT.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 May 2005
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'rotation_axis2quat_test():\n' );
  fprintf ( 1, '  ROTATION_AXIS2QUAT converts a rotation axis to a quaternion.\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 );

  q = rotation_axis2quat ( axis, angle );

  r8vec_print ( 4, q, '  The rotation quaternion Q:' );

  w = rotation_quat_vector ( q, v );

  r8vec_print ( 3, w, '  The rotated vector W:' );
%
%  Another test of ROTATION_AXIS_VECTOR with an axis vector
%  that does not have unit length.
%
  v = [ 1.0; 1.0; 1.0 ];
  r8vec_print ( 3, v, '  The vector V:' );

  axis(1:3) = [ 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 );
  q = rotation_axis2quat ( axis, angle );

  r8vec_print ( 4, q, '  The rotation quaternion Q:' );

  w = rotation_quat_vector ( q, v );

  r8vec_print ( 3, w, '  The rotated vector W:' );

  return
end
