Skip to content

Documentation / @interstellar-tools/equations / rot1

Function: rot1() ​

ts
function rot1(theta: Radians): Matrix3x3Type;

Defined in: helpers/rot-1.ts:38

Construct a right-handed rotation matrix about the x-axis (often written R₁).

This returns the 3×3 direction cosine matrix (DCM) for an active rotation by angle theta around the +X axis, using the common aerospace convention:

R1(θ)=[1000cos⁡θ−sin⁡θ0sin⁡θcos⁡θ]

Notes:

  • theta is in radians.
  • Matrix layout is row-major: M[row][col].
  • Useful for composing 3-1-3 / 3-2-1 sequences (e.g., IAU body orientation) and for general 3D frame transforms in mapping pipelines.

Parameters ​

ParameterTypeDescription
thetaRadiansRotation angle (θ) in radians (finite).

Returns ​

Matrix3x3Type

3×3 rotation matrix (R1(θ)) (row-major).

Throws ​

If theta is not a finite number.

Example ​

ts
// Rotate a vector about +X by 90°:
const R = rot1(Math.PI / 2);