next up previous index
Next: F110 TC Matrix Up: CERNLIB Previous: F012 Symmetric Positive-Definite

F105 Rotate a Three-Dimensional Polar Coordinate System

Routine ID: F105
Author(s): M. ReglerLibrary: MATHLIB
Submitter: Submitted: 01.03.1968
Language: FortranRevised: 27.11.1984

POLROT calculates the values of θ' and φ' of the coordinate system S'(θ',φ',r) , obtained by rotation of the 3-dimensional polar coordinate system S(θ,φ,r) about any axis (0≤θ≤π,0≤φ≤2π) .

Structure:

SUBROUTINE subprogram
User Entry Names: POLROT

Usage:

    CALL POLROT(THETA,PHI,THPRIM,PHPRIM,THAX,PHAX,ROTANG)
THETA
( REAL) Angle θ in the old system S(θ,φ,r) .
PHI
( REAL) Angle φ in the old system S(θ,φ,r) .
THPRIM
( REAL) Angle θ' in the new system S'(θ',φ',r) .
PHPRIM
( REAL) Angle φ' in the new system S'(θ',φ',r) .
THAX,PHAX
( REAL) Angles defining the axis of rotation in the old system S(θ,φ,r) .
ROTANG
( REAL) Angle in the old system through which the system is rotated.
The subroutine calculates from THETA and PHI the new values THPRIM and PHPRIM in a coordinate system obtained by rotating the old system through an angle ROTANG about an axis defined by THAX and PHAX in the old system.

Method:

THETA and PHI are converted to a unit vector in Cartesian coordinates; THAX, PHAX and ROTANG are converted to a tensor, which is used to obtain a vector in the new system of axes giving THPRIM and PHPRIM.

Notes:

If THPRIM is very small, PHPRIM is badly defined.

F110


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995