_ROT_(3F) _ROT_(3F)
drotg, srotg, drot, srot - BLAS level ONE rotation subroutines
subroutine drotg( da, db, c, s )
double precision c, da, db, s
subroutine srotg( sa, sb, c, s )
real c, s, sa, sb
subroutine drot( n, dx, incx, dy, incy, c, s )
integer incx, incy, n
double precision c, s
double precision dx( 1 ), dy( 1 )
subroutine srot( n, sx, incx, sy, incy, c, s )
integer incx, incy, n
real c, s
real sx( 1 ), sy( 1 )
DROTG and SROTG compute C and S, the Cosine and Sine of the rotation,
given the coordinates of a transformed vector (da, db) or (sa, sb).
DROT and SROT apply a plane rotation (Cosine = C, Sine = S) to N points
whose coordinates are defined by the DX (SX) and DY (SY) vectors.
Jack Dongarra, linpack, 3/11/78.
rotate(3G) rotate(3G)
rotate, rot - rotates the current matrix
void rotate(a, axis)
Angle a;
char axis;
void rot(a, axis)
float a;
char axis;
a expects the angle of rotation.
axis expects the relative axis of rotation. There are three character
literal values for this parameter:
'x' indicates the x-axis.
'y' indicates the y-axis.
'z' indicates the z-axis.
rotate and rot specify an angle (a) and an axis of rotation (axis). The
angle given to rotate is an integer and is specified in tenths of degrees
according to the right-hand rule. The angle given to rot is a floating
point value and is specified in degrees according to the right-hand rule.
The angle and axis are used to compute a 4x4 rotation matrix, which then
premultiplies the current matrix, as specified by mmode. Thus if T is
the current matrix, and R is the rotation matrix computed by rotate or
rot, T is replaced with R*T. The current matrix is the top matrix on the
transformation stack if mmode is MSINGLE, the top matrix on the ModelView
matrix stack if mmode is MVIEWING, the Projection matrix if mmode is
MPROJECTION, or the Texture matrix if mmode is MTEXTURE.
All objects drawn after rotate or rot is called while mmode is either
MSINGLE or MVIEWING are rotated. Use pushmatrix and popmatrix to
preserve and restore the unrotated coordinate system.
mmode, popmatrix, pushmatrix, scale, translate
PPPPaaaaggggeeee 1111 [ Back ]
|