--- id: transformations version: "2026.8.8" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # transformations — Homogeneous Transformation Matrices and Quaternions License: permissive · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does Transformations is a Python library for working with 3D homogeneous transformation matrices and quaternions. It provides functions to construct and manipulate 4x4 matrices for common 3D operations—translation, rotation, scaling, shearing, reflection, and projection—and to convert between different rotation representations (matrices, Euler angles, quaternions). The library also includes utilities like matrix decomposition and an Arcball control object for interactive 3D rotation. The package depends only on numpy and includes a C extension for performance-critical operations. It is maintained but explicitly noted as no longer actively developed; the author recommends considering alternatives like Pytransform3d, scipy.spatial.transform, or transforms3d for new projects. The API is not stable and may change between releases. Use it for: - Convert between Euler angles and rotation matrices in computer graphics or robotics pipelines. - Compose multiple 3D transformations (rotation, translation, scaling) into a single matrix. - Decompose a transformation matrix into its constituent scale, shear, rotation, and translation components. - Work with quaternions for smooth 3D rotations and interpolation in animation or game engines. - Implement Arcball-style interactive 3D rotation controls in visualization applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Calculates 4x4 homogeneous transformation matrices for 3D coordinate operations (translation, rotation, scaling, shearing) and converts between rotation matrices, Euler angles, and quaternions. Yes, if you are working with legacy code or have a specific need for homogeneous transformation matrices and quaternion conversions. The package is stable, permissively licensed, and actively maintained. However, for new projects, consider the alternatives mentioned in the documentation (Pytransform3d, scipy.spatial.transform, transforms3d) which may offer more active development and fewer known numerical instabilities. ## Install pip install transformations uv add transformations poetry add transformations ## Installing transformations Before you install: Medium install friction due to compiled C extensions, but wheels are widely available for modern Python versions (3.12+) and common platforms. Actively maintained with recent updates; last commit 2026-08-09. License in practice: BSD-3-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice. Quickstart: import numpy from transformations import rotation_matrix, euler_from_matrix R = rotation_matrix(0.5, [1, 0, 0]) # 0.5 rad rotation around x-axis angles = euler_from_matrix(R, 'rxyz') Requires numpy 2.5.2 (or compatible version); Python 3.12 or later. Verify before relying: - Whether the known numerical instabilities mentioned in the description affect your specific use case. - Performance characteristics compared to the suggested alternatives (Pytransform3d, scipy.spatial.transform, transforms3d). ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags 3d transformation matrices, quaternion rotation conversion, homogeneous coordinates, euler angles to matrix, 3d geometry transformations, rotation matrix operations, quaternion math library, 3d-graphics, quaternions, linear-algebra [View on SkillFed](https://skillfed.io/packages/transformations) · [View on PyPI](https://pypi.org/project/transformations/)