Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pro(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ROTATE(3P)  —  SUNPHIGS LIBRARY

NAME

ROTATE − calculate a 2D transformation matrix to perform a specified 2D rotation. 

SYNOPSIS

C Syntax

void
protate ( angle, error_ind, matrix )
Pfloatangle;rotation angle
Pint∗error_ind;OUT error indicator
Pmatrixmatrix;OUT transformation matrix

FORTRAN Syntax

SUBROUTINE pro ( ROTANG, ERRIND, XFRMT )
REALROTANGrotation angle in radians (positive
if anticlockwise)
INTEGERERRINDOUT error indicator
REALXFRMT(3, 3)OUT transformation matrix

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

Use ROTATE to generate a 2D homogeneous (3 x 3) transformation matrix that performs a 2D rotation. 

The returned matrix may be passed as an argument to SET LOCAL TRANSFORMATION or SET GLOBAL TRANSFORMATION to modify the modelling transformation that is applied to output primitives during traversal. 

C Input Parameter

angleThe angle of the rotation in radians.  Positive angles indicate counter-clockwise rotation, negative angles indicate clockwise rotation. 

C Output Parameters

error_ind
A pointer to the location to store the error number of any error detected by this function.

matrix
The 3 x 3 transformation matrix that performs the specified rotation. Pmatrix is defined in phigs.h as follows:

typedef  Pfloat  Pmatrix[3][3];

FORTRAN Input Parameter

ROTANG
The angle of the rotation in radians. Positive angles indicate counter-clockwise rotation, negative angles indicate clockwise rotation.

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.

XFRMT
The 3 x 3 transformation matrix that performs the specified rotation.

Execution

ROTATE returns a 2D homogeneous (3 x 3) transformation matrix that performs the rotation specified by angle.  The rotation is specified in radians.  The rotation is relative to the origin of the current modelling coordinate system. 

ERRORS

002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)

SEE ALSO

ROTATE X (3P)
ROTATE Y (3P)
ROTATE Z (3P)
SET LOCAL TRANSFORMATION 3 (3P)
BUILD TRANSFORMATION MATRIX 3 (3P)
COMPOSE MATRIX (3P)
TRANSFORM POINT (3P)

Sun Release 4.0  —  Last change: 1 August 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026