4D rotation exponential, logarithm and geodesics
In your harness4D geometry toolMIT
Turn plane rates into a rotation with a closed-form matrix exponential, recover the two invariant plane angles and the generator of any 4D rotation, classify it (simple, isoclinic, double), interpolate along SO(4) geodesics, and write a looping rotation glTF.

What it takes and gives
- Entry points
- generator, is_skew, generator_angles, expm, rotation_angles, logm, classify, geodesic and 7 more
- Outputs
- example.gltf
- Coordinates
- x, y, z, w; frames projected in perspective to Godot/glTF +Y up
Limits. The animation stores keyframes as morph targets, so vertices move along chords between keyframes: the largest deviation from the true rotation is 1 - cos(step/2) of the radius (0.0086 for the example with 48 frames and rate 2). Tubes are unlit three-sided prisms whose positions are morphed without normal targets. The logarithm is ill-conditioned for nearly isoclinic rotations, where the invariant planes are not unique, and picks one plane pair for rotations by pi.
Details
- Kind
- 4D geometry tool
- Engine
- Python 3.10 or later
- Files
- 10 files, 326.1 KB
- Licence
- MIT
- Declared effects
- reads files, runs commands, writes files
- Checked with
- Godot 4.7.2, gl_compatibility (opengl3, Mesa llvmpipe under Xvfb)
- Checks
- cli rebuilds example, gltf structure example, cli example runs, cli example gltf structure, godot loads example, godot loads cli 24cell isoclinic, preview render
- Techniques
- invariant plane decomposition of SO(4), Pfaffian of a 4x4 skew-symmetric matrix, closed-form exponential from the minimal polynomial (Rodrigues-type formula), principal matrix logarithm of a rotation, geodesics of SO(4) with the bi-invariant metric
- Tags
- 4d, rotation, so4, matrix exponential, matrix logarithm, double rotation, isoclinic, interpolation
- Identity
library.supply.creative_originals.df0ee983634e8262e1182370.82c1a0b127f25095- Version
82c1a0b127f250953ef84b655f8e4a96716cb5a1066e72ac2337c72fb57afdbc
The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.
Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.


