Plan
The crate skoro-spatial built in order, from its storage arithmetic and the three declarations through the maps of the rotations, the Euler angles and the reading of matrices, to the maps of the rigid motions, the checks over every composite and the normal on these types, each task a commit with its tests.
Each task is one commit, and the workspace compiles and passes its tests after each. The design of
every item is in the implementation companion; the tests named are those of
its Tests, each in exactly one task, run at both precisions of the Flex
device through precision_tests! wherever the companion compares a pass, at the rows its Tests
section prescribes.
The crate and its types (skoro-spatial)#
- The crate
crates/skoro-spatial, a member of the workspace and ofworkspace.dependencies, depending onskoro-coreandskoro-tensoralone, withskoro-normalas a development dependency and the workspace’s lints;lib.rsand its re-exports;algebra.rswith the storage arithmetic of the companion,bothamong it. Tests: none of the companion’s; the crate builds and lints clean. -
types.rs: the declarationsskoro.spatial.rotation,skoro.spatial.poseandskoro.spatial.extended_posewith their retractions normalizing the base point, inverses, projections and global volumes, each in aLazyLockwith its dead branchunreachable!; the markersRotation,PoseandExtendedPose; their host values, normalized and refused when zero or non-finite; andregister. Tests:types_are_declared,types_pass_the_core_checks,chart_is_stereographic,volume_has_the_stated_mass.
The maps of the rotations#
-
rotation.rs, the group:QMulforRotationon itself,Vector<3>,VectorDynandMatrix<3, N>;RotationMapswithinverse,between,unrotate,matrixandadjoint;rotation::identity; and inso3.rs,hatandvee. Tests:group_laws,actions_are_the_matrix,conjugation_is_exact,hat_and_vee. -
series.rs: the coefficientsa,b,A,B,C,D,Eandlog_ratio, with the cutoffs and series lengths of the companion’s table and both guards;rotation::exp,RotationMaps::logandlog_shorter; andso3::jl,jr,jl_invandjr_inv. Tests:exp_and_log. - The constructions:
rotation::elementary,aboutandfrom_two_vectors,RotationMaps::axis_anglewith its guarded axis, andaligned_with; inhost.rs,align. Tests:constructions,alignment. -
euler.rs:Axis,Sequence,Frame,EulerwithYAW_PITCH_ROLLandaxes; the compositesskoro.spatial.from_eulerandskoro.spatial.euler, cached by intrinsic sequence, with the Tait–Bryan rearrangement,LOCKand its guards, and the extrinsic conventions by reversal;rotation::from_eulerandRotationMaps::euler;host::from_eulerandhost::euler. Tests:euler_round_trips. -
rotation::from_matrixby the tournament over the four arguments, projecting the one chosen; the rest ofhost.rs:compose,matrix,from_matrix,expandlog. Tests:from_matrix_branches.
The maps of the rigid motions#
-
pose.rsandextended.rs, the groups:QMulforPoseon itself and onVector<3>, and forExtendedPoseon itself;PoseMapsandExtendedPoseMapswithinverse,between,rotate,untransform, the parts,matrixandadjoint;as_product;pose::identity,from_partsandfrom_product;extended_pose::identityandfrom_parts. Tests:motion_group_laws,parts_and_products. - The motions’ exponentials and logarithms,
pose::exp,extended_pose::exp,logandlog_shorteron both; the compositeskoro.spatial.motion_q; and the Jacobians and their inverses,pose::jl,jr,jl_inv,jr_invand the extended pose’s. Tests:motion_exp_and_log,adjoints_conjugate,jacobians_are_the_passes,second_order_agrees_on_rotations,series_meet_closed_forms. - The interpolations and the angle:
RotationMaps::slerp,slerp_shorterandangle_to;PoseMaps::interpolate,interpolate_shorter,interpolate_partsandinterpolate_parts_shorter;ExtendedPoseMaps::interpolateandinterpolate_shorter. Tests:interpolations.
The checks over every composite#
-
testing::check_operationover every composite of the crate at the fixed and random rows, the discrete maps at rows away from their jumps; and the jumps themselves, the exact locks of the Euler angles built in storage among them. Tests:composites_pass_check_operation,discretizations_jump_cleanly.
The normal on these types#
- With
skoro-normal, the normal scored onRotationandPose: its density through the chart, its term against the Gaussian of the chart coordinate, and its draws through . Tests:normal_density_on_rotations,normal_density_on_poses,normal_draws_on_rotations.
The revision of the Euler angles and the singular rows#
-
LOCKat , shared by the composite andhost::euler, with its documentation saying the bound it meets and that it decides finiteness, not the round trip. Tests: the cases the companion adds toeuler_round_trips, at rows within the threshold of the lock and just outside it for the proper sequences, and at the Tait–Bryan locks under rounding, with the random angles kept away from the wrap. - The wrap of the Euler angles, with
euler’s documentation saying where its angles are cut and that only their values jump there. Tests: the wrap rows the companion adds todiscretizations_jump_cleanly, and everyeulerrow ofcomposites_pass_check_operationat least from . -
angle_residualand the sealed traitAnglesineuler.rs, re-exported from the crate’s root. Tests:angle_residual_is_on_the_circle. - The documentation of every singular row as Errors and domains states it:
from_two_vectors, the inverse retraction,log,jl_inv, the motions’ logarithms andangle_to, each saying that it is non-finite exactly at the row and what it gives within rounding of it. Tests:constructionschecks the non-finite case only at opposite pairs whose norms are exact, as it does, with a comment saying why.
Done when#
Every box is ticked, and
bin/wf check
cargo fmt --all --check && cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cd site && pnpm check && pnpm lint && pnpm test && pnpm buildpass. The crate writes no kernel, so the wgpu tests are not required of it; the core’s acceptance test is untouched and passes as before.
Revisions#
2026-11-03. Reopened with the mathematics and the implementation, which now treat the Euler
angles at the wrap as well as at the lock, add the residual on the circle, set the lock’s
threshold by the mathematics’ bound, and state what a map gives within rounding of a singular row.
The tasks of the first build stand, ticked; four tasks under The revision of the Euler angles and the singular rows build the changes. The one new test, angle_residual_is_on_the_circle, is in the third; the cases
added to tests that earlier tasks built are named in the task that adds them.