|
Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/rotate_c.html
Дата изменения: Sat Dec 17 06:09:36 2005 Дата индексирования: Mon Apr 11 00:08:17 2016 Кодировка: Поисковые слова: redshift survey |
Calculate the 3x3 rotation matrix generated by a rotation of a specified angle about a specified axis. This rotation is thought of as rotating the coordinate system.
None.
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
angle I Angle of rotation (radians).
iaxis I Axis of rotation (X=1, Y=2, Z=3).
mout O Resulting rotation matrix [angle]
iaxis
angle The angle given in radians, through which the rotation
is performed.
iaxis The index of the axis of rotation. The X, Y, and Z
axes have indices 1, 2 and 3 respectively.
mout Rotation matrix which describes the rotation of the
COORDINATE system through angle radians about the
axis whose index is iaxis.
None.
A rotation about the first, i.e. x-axis, is described by
| 1 0 0 |
| 0 cos(theta) sin(theta) |
| 0 -sin(theta) cos(theta) |
A rotation about the second, i.e. y-axis, is described by
| cos(theta) 0 -sin(theta) |
| 0 1 0 |
| sin(theta) 0 cos(theta) |
A rotation about the third, i.e. z-axis, is described by
| cos(theta) sin(theta) 0 |
| -sin(theta) cos(theta) 0 |
| 0 0 1 |
rotate_c decides which form is appropriate according to the value
of IAXIS.
If rotate_c is called from a C program as follows:
rotate_c ( pi_c()/4, 3, mout );
then mout will be given by
| sqrt(2)/2 sqrt(2)/2 0 |
mout = |-sqrt(2)/2 sqrt(2)/2 0 |
| 0 0 1 |
None.
Error free.
1) If the axis index is not in the range 1 to 3 it will be
treated the same as that integer 1, 2, or 3 that is congruent
to it mod 3.
None.
N.J. Bachman (JPL) W.M. Owen (JPL) W.L. Taber (JPL)
None.
-CSPICE Version 1.0.0 08-FEB-1998 (NJB)
Based on SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
generate a rotation matrix