glamx 0.1.0

Physics-oriented extensions of glam (Rot2, Pose2, Pose3, SdpMatrix, symmetric eigen): port of Dimforge glamx on the fixed Q32.32 scalar

Readme

glamx

Port of Dimforge glamx 0.3.1 to Cairo on top of glam and the fixed Q32.32 scalar: Rot2, Rot3, Pose2, Pose3, symmetric positive-definite matrices and the symmetric 3x3 eigen-decomposition, i.e. the math layer parry and rapier are written against.

Scope: docs/research/06-glamx-scope.md. Progress: docs/PORTING_STATUS.md. Compatible with Cairo 2.19.4.

Gas

Sierra gas (l2 gas, what a transaction pays) and prover cost (steps, range checks) of one call, net of the test overhead (X__op - X__base, see scripts/bench.py), measured with scarb 2.19.4, starknet-foundry 0.61.0 (.tool-versions). Source of truth: gas/*.snap; this region is generated by scripts/gas_tables.py, do not edit it.

Pose3

op l2 gas steps range checks mul_pose3 18 480 164 28 inv_mul 20 700 182 34 inverse 10 360 94 12 transform_point 10 260 93 12 transform_vector 9 360 84 12 inverse_transform_point 11 580 102 18 nlerp 34 910 284 59 to_mat4 21 360 183 42

Pose2

op l2 gas steps range checks mul 8 840 76 16 inv_mul 9 920 84 20 inverse 5 180 45 8 transform_point 5 080 44 8 transform_vector 4 680 40 8

Rot2

op l2 gas steps range checks mul 4 680 40 8 mul_vec2 4 680 40 8 inverse 400 4 0 from_angle 31 300 243 62 angle 28 120 202 44 normalize 8 940 75 18 lerp 4 880 42 8 slerp 70 450 531 126

SdpMatrix3

op l2 gas steps range checks mul_vec 7 160 62 12 mul_mat 19 640 170 36 add 5 960 50 12 quadform 21 130 183 24 inverse_regular 27 650 226 56 from_rotated_diagonal 35 550 299 66

Metadata

Version 0.1.0

Uploaded 11 hours ago

License MIT

Cairo version ^2.19.4

Size 97.6 KB

Installation

Run the following command in your project dir

scarb add glamx@0.1.0

Or add the following line to your Scarb.toml

glamx = "0.1.0"

Monthly downloads

Links

Owners