Skip to main content

rotmat_to_quaternion

Calculate quaternion with rotation matrix.

Installation

pip install rotmat_to_quaternion

Usage

from rotmat_to_quaternion import quaternion_to_rotation_matrix
from rotmat_to_quaternion import rotation_matrix_to_quaternion
import math

# Test quaternion: 90° rotation around Z-axis
q = [math.sqrt(2)/2, 0.0, 0.0, math.sqrt(2)/2]
print("Original quaternion [w,x,y,z]:")
print([round(v, 6) for v in q])

# Convert to rotation matrix
mat = quaternion_to_rotation_matrix(q)
print("\nQuaternion -> Rotation Matrix:")
for row in mat:
    print([round(v, 6) for v in row])

# Convert back to quaternion
q_recovered = rotation_matrix_to_quaternion(mat)
print("\nRotation Matrix -> Quaternion [w,x,y,z]:")
print([round(v, 6) for v in q_recovered])

Metadata

Release files for rotmat-to-quaternion 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rotmat-to-quaternion 0.1.0
File Size Uploaded
rotmat_to_quaternion-0.1.0.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rotmat-to-quaternion 0.1.0
File Interpreter ABI Platform
rotmat_to_quaternion-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / rotmat_to_quaternion-0.1.0.tar.gz

Download URL rotmat_to_quaternion-0.1.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a85853c907608e5e81251acd357058e108b8a8628dd4800f039df829fc397e50
BLAKE2b-256 checksum
How to use checksums
8119dfd096ebcdb185d6df34b5931881df7df01f9e5f7ad4fd83113cdddf0904
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.12 Windows/11

Release files / rotmat_to_quaternion-0.1.0-py3-none-any.whl

Download URL rotmat_to_quaternion-0.1.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee06de0759de722caa1044ab9c9d4d3c2fbf80c7a4212621f660ca691e412369
BLAKE2b-256 checksum
How to use checksums
e3886d7aef4cc82c5b7ffe4101fc9441b3bbd5862d233b9d3f7322417f643004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.12 Windows/11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page