fungeom 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fungeom-0.1.0/.gitignore +23 -0
- fungeom-0.1.0/CHANGELOG.md +29 -0
- fungeom-0.1.0/LICENSE +201 -0
- fungeom-0.1.0/PKG-INFO +168 -0
- fungeom-0.1.0/README.md +137 -0
- fungeom-0.1.0/pyproject.toml +85 -0
- fungeom-0.1.0/src/fungeom/__init__.py +215 -0
- fungeom-0.1.0/src/fungeom/core/__init__.py +22 -0
- fungeom-0.1.0/src/fungeom/core/arrays.py +25 -0
- fungeom-0.1.0/src/fungeom/core/resolvability.py +74 -0
- fungeom-0.1.0/src/fungeom/core/resolver.py +85 -0
- fungeom-0.1.0/src/fungeom/primitives/__init__.py +164 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/__init__.py +8 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/decidability.py +14 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/resolvers/__init__.py +0 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/resolvers/base.py +88 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/resolvers/comparison.py +54 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/resolvers/conjunction.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/resolvers/disjunction.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/resolvers/literal.py +23 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/resolvers/negation.py +22 -0
- fungeom-0.1.0/src/fungeom/primitives/boolean/value.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/__init__.py +23 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/base.py +305 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/boolean.py +213 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/direction3.py +139 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/fit.py +115 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/plane_ops.py +52 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/point2.py +313 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/point3.py +419 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/scalar.py +276 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/transform.py +108 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/resolvers/vec3.py +205 -0
- fungeom-0.1.0/src/fungeom/primitives/bundle/value.py +55 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/__init__.py +10 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/base.py +92 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/contains.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/difference.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/gaps.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/hull.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/intersection.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/literal.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/total_duration.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/resolvers/union.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/coverage/value.py +103 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/angle.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/angle_to.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/base.py +105 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/dot.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/literal.py +20 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/normalized.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/perpendicular.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/reversed.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/signed_angle.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/slerp.py +45 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/resolvers/vector.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/direction2/value.py +74 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/__init__.py +4 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/angle.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/any_perpendicular.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/base.py +110 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/cross.py +37 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/dot.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/literal.py +20 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/normalized.py +37 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/reversed.py +22 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/signed_angle.py +44 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/slerp.py +48 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/resolvers/vector.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/direction3/value.py +58 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/__init__.py +7 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/decidability.py +14 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/absolute.py +22 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/base.py +164 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/clamp.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/literal.py +38 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/maximum.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/minimum.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/ratio.py +39 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/scaled.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/resolvers/sum.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/duration/value.py +16 -0
- fungeom-0.1.0/src/fungeom/primitives/face/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/face/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/face/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/face/resolvers/base.py +83 -0
- fungeom-0.1.0/src/fungeom/primitives/face/resolvers/clearance.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/face/resolvers/closest_point.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/face/resolvers/contains.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/face/resolvers/on.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/face/resolvers/parts.py +42 -0
- fungeom-0.1.0/src/fungeom/primitives/face/value.py +57 -0
- fungeom-0.1.0/src/fungeom/primitives/frame/__init__.py +8 -0
- fungeom-0.1.0/src/fungeom/primitives/frame/decidability.py +21 -0
- fungeom-0.1.0/src/fungeom/primitives/frame/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/frame/resolvers/attached.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/frame/resolvers/base.py +59 -0
- fungeom-0.1.0/src/fungeom/primitives/frame/resolvers/known.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/frame/resolvers/relative.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/frame/value.py +90 -0
- fungeom-0.1.0/src/fungeom/primitives/frame2/__init__.py +10 -0
- fungeom-0.1.0/src/fungeom/primitives/frame2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/frame2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/frame2/resolvers/attached.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/frame2/resolvers/base.py +55 -0
- fungeom-0.1.0/src/fungeom/primitives/frame2/resolvers/known.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/frame2/resolvers/relative.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/frame2/value.py +80 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/__init__.py +7 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/decidability.py +14 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/affine.py +52 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/base.py +142 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/centroid.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/difference.py +38 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/lerp.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/literal.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/maximum.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/minimum.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/resolvers/shifted.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/instant/value.py +18 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/base.py +148 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/between.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/clamp.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/contains.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/endpoint.py +46 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/hull.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/intersection.py +37 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/resolvers/overlaps.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/interval/value.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/line/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/line/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/base.py +99 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/direction.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/direction_along.py +46 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/distance_to.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/origin.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/point_at.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/project.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/through.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/line/resolvers/through_points.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/line/value.py +73 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/base.py +99 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/direction.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/distance_to.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/intersect.py +46 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/normal.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/origin.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/point_at.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/project.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/signed_distance.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/through.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/resolvers/through_points.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/line2/value.py +80 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/base.py +229 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/embed.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/facing.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/flipped.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/frame.py +53 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/intersect.py +46 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/normal.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/offset.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/origin.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/project.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/project_direction.py +40 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/signed_distance.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/spanned_by.py +38 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/through.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/through_points.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/to_local.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/resolvers/winding_normal.py +50 -0
- fungeom-0.1.0/src/fungeom/primitives/plane/value.py +98 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/affine.py +56 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/base.py +132 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/centroid.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/displacement.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/framed.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/lerp.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/located.py +22 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/reflected.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/transformed.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/resolvers/translated.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/point2/value.py +70 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/__init__.py +4 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/affine.py +60 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/base.py +137 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/centroid.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/displacement.py +37 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/framed.py +37 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/lerp.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/located.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/reflected.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/transformed.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/resolvers/translated.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/point3/value.py +70 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/base.py +100 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/direction.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/distance_to.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/from_to.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/intersect.py +45 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/origin.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/point_at.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/project.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/reversed.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/resolvers/through.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/ray/value.py +74 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/base.py +91 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/direction.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/distance_to.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/from_to.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/intersect.py +45 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/origin.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/point_at.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/project.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/reversed.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/resolvers/through.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/ray2/value.py +72 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/__init__.py +10 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/area.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/base.py +219 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/boolean.py +73 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/bounds.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/centroid.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/closest_point.py +41 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/contains.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/disc.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/hull.py +58 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/literal.py +20 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/nearest_boundary.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/offset.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/perimeter.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/polygon.py +43 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/predicates.py +53 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/rectangle.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/sample.py +43 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/signed_distance.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/transformed.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/resolvers/vertices.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/shapely_bridge.py +55 -0
- fungeom-0.1.0/src/fungeom/primitives/region2/value.py +232 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/__init__.py +10 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/resolvers/base.py +78 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/resolvers/contains.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/resolvers/count.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/resolvers/difference.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/resolvers/intersection.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/resolvers/literal.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/resolvers/union.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/roster/value.py +71 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/base.py +100 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/composed.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/identity.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/inverse.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/literal.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/maps.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/source.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/resolvers/target.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/rostermap/value.py +71 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/resolvers/base.py +66 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/resolvers/count.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/resolvers/explicit.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/resolvers/rate.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/resolvers/span.py +26 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/resolvers/uniform.py +43 -0
- fungeom-0.1.0/src/fungeom/primitives/sampling/value.py +65 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/__init__.py +3 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/decidability.py +14 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/absolute.py +22 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/base.py +181 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/ceil.py +23 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/clamp.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/floor.py +23 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/literal.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/maximum.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/minimum.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/modulo.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/power.py +37 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/product.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/quotient.py +34 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/round.py +22 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/sign.py +23 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/sqrt.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/resolvers/sum.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/scalar/value.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/at.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/base.py +106 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/between.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/direction.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/distance_to.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/endpoints.py +42 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/length.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/midpoint.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/parameter_of.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/project.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/resolvers/reversed.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/segment/value.py +80 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/at.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/base.py +98 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/between.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/direction.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/distance_to.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/endpoints.py +42 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/length.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/midpoint.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/parameter_of.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/project.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/resolvers/reversed.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/segment2/value.py +79 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/__init__.py +43 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/blend.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/boolean.py +320 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/boundary.py +66 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/bundle.py +955 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/direction3.py +268 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/interpolation.py +92 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/plane.py +243 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/point3.py +312 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/scalar.py +481 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/series.py +553 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/transform.py +266 -0
- fungeom-0.1.0/src/fungeom/primitives/signals/vec3.py +300 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/__init__.py +8 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/resolvers/base.py +93 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/resolvers/derived.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/resolvers/grounded.py +40 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/resolvers/known.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/resolvers/relative.py +42 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/resolvers/to_master.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/timeline/value.py +81 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/resolvers/affine.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/resolvers/aligning.py +35 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/resolvers/base.py +123 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/resolvers/composed.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/resolvers/inverse.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/resolvers/literal.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/resolvers/through.py +45 -0
- fungeom-0.1.0/src/fungeom/primitives/timemap/value.py +57 -0
- fungeom-0.1.0/src/fungeom/primitives/timewarp/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/timewarp/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/timewarp/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/timewarp/resolvers/base.py +75 -0
- fungeom-0.1.0/src/fungeom/primitives/timewarp/resolvers/domain.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/timewarp/resolvers/inverse.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/timewarp/resolvers/through.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/timewarp/value.py +54 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/__init__.py +4 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/aligning.py +44 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/applied_direction.py +32 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/applied_vector.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/axis_angle.py +41 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/base.py +149 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/composed.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/from_axes.py +53 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/inverse.py +22 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/literal.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/look_at.py +57 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/rotation_part.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/slerp.py +44 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/translation.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/resolvers/translation_part.py +23 -0
- fungeom-0.1.0/src/fungeom/primitives/transform/value.py +130 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/__init__.py +6 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/angle.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/applied_direction.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/applied_vector.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/base.py +113 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/composed.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/inverse.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/literal.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/rotation.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/rotation_part.py +29 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/slerp.py +41 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/translation.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/resolvers/translation_part.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/transform2/value.py +129 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/__init__.py +4 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/angle.py +38 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/base.py +133 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/components.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/coordinate.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/dot.py +48 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/lerp.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/literal.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/norm.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/normalized.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/perpendicular.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/projected.py +59 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/resized.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/scaled.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/resolvers/sum.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/vec2/value.py +25 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/__init__.py +4 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/decidability.py +15 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/__init__.py +1 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/angle.py +38 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/base.py +143 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/components.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/coordinate.py +24 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/cross.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/dot.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/lerp.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/literal.py +31 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/norm.py +30 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/normalized.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/projected.py +59 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/resized.py +36 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/scalar_triple.py +33 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/scaled.py +28 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/resolvers/sum.py +27 -0
- fungeom-0.1.0/src/fungeom/primitives/vec3/value.py +30 -0
- fungeom-0.1.0/src/fungeom/py.typed +0 -0
- fungeom-0.1.0/src/fungeom/values.py +87 -0
- fungeom-0.1.0/src/fungeom/viz.py +51 -0
- fungeom-0.1.0/wiki/README.md +23 -0
fungeom-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Python bytecode / packaging
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
|
|
8
|
+
# Virtual environment
|
|
9
|
+
.venv/
|
|
10
|
+
|
|
11
|
+
# Tooling caches / reports
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
coverage.xml
|
|
17
|
+
htmlcov/
|
|
18
|
+
|
|
19
|
+
# Editor / OS
|
|
20
|
+
.DS_Store
|
|
21
|
+
|
|
22
|
+
# Claude Code: personal (machine-local) settings — shared settings.json IS tracked
|
|
23
|
+
.claude/settings.local.json
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to fungeom are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). The version is derived from git tags
|
|
6
|
+
(`vX.Y.Z`); see [RELEASING.md](RELEASING.md).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
The first release. fungeom models geometry as an immutable, lazily-evaluated, **decidable** graph
|
|
11
|
+
of resolvers where partiality is first-class (`decide()` → `Resolvable` / `Unresolvable`).
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Decidability core** — `Resolver`, `Resolvable` / `Unresolvable` (reason-carrying), `gather`,
|
|
16
|
+
memoized `decide()`; `resolve()` / `is_resolvable` derived from it.
|
|
17
|
+
- **Geometry** — `Scalar`, `Vec2` / `Vec3`, `Direction2` / `Direction3`, `Transform` / `Transform2`,
|
|
18
|
+
`Frame` / `Frame2`, `Point2` / `Point3`, and the `Plane` / `Line` / `Ray` / `Segment` family.
|
|
19
|
+
- **Logic** — three-valued `Bool` with strict propagation.
|
|
20
|
+
- **Time** — `Duration`, `Instant`, `Interval`, `Coverage`, `Sampling`, `Timeline`, `TimeMap`,
|
|
21
|
+
`TimeWarp`.
|
|
22
|
+
- **Signals** — `Scalar` / `Vec3` / `Direction3` / `Transform` / `Point3` signals, `PlaneSignal`,
|
|
23
|
+
and the three-valued `BoolSignal`; derivatives, reductions, transport, `lift`/`map`,
|
|
24
|
+
`resolve_over`.
|
|
25
|
+
- **Collections** — `…Bundle` and `…BundleSignal` (occlusion-aware), `Roster` / `RosterMap`.
|
|
26
|
+
- **Regions** — `Point2Bundle`, `Region2` (general GEOS-backed boolean algebra + `offset`), `Face`.
|
|
27
|
+
- Ten runnable examples, full wiki + reference docs, 100% test coverage.
|
|
28
|
+
|
|
29
|
+
[Unreleased]: https://github.com/ryanrudes/fungeom/commits/main
|
fungeom-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Ryan Rudes
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
fungeom-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fungeom
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Functional geometry as an immutable, decidable resolver graph.
|
|
5
|
+
Project-URL: Repository, https://github.com/ryanrudes/fungeom
|
|
6
|
+
Project-URL: Documentation, https://github.com/ryanrudes/fungeom/wiki
|
|
7
|
+
Project-URL: Issues, https://github.com/ryanrudes/fungeom/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/ryanrudes/fungeom/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Ryan Rudes
|
|
10
|
+
License: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: decidability,frames,functional,geometry,transforms
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.13
|
|
21
|
+
Requires-Dist: numpy>=2.4.6
|
|
22
|
+
Requires-Dist: rich>=15.0.0
|
|
23
|
+
Requires-Dist: scipy>=1.17.1
|
|
24
|
+
Requires-Dist: shapely>=2.0.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: mypy>=1.11; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8.2; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
<h1 align="center">fungeom</h1>
|
|
33
|
+
|
|
34
|
+
<p align="center"><em>Functional geometry as an immutable, decidable resolver graph.</em></p>
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://github.com/ryanrudes/fungeom/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/ryanrudes/fungeom/actions/workflows/ci.yml/badge.svg"></a>
|
|
38
|
+
<img alt="Python 3.13+" src="https://img.shields.io/badge/python-3.13%2B-blue">
|
|
39
|
+
<img alt="Coverage 100%" src="https://img.shields.io/badge/coverage-100%25-brightgreen">
|
|
40
|
+
<img alt="License Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-lightgrey">
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
fungeom is a Python library for building geometry as a **lazy, immutable graph** you can *reason
|
|
46
|
+
about before you compute it*. You compose points, vectors, frames, transforms, time-signals, and
|
|
47
|
+
regions; ask whether the result **can** be resolved; and — when it can't — get back a *reason*,
|
|
48
|
+
not an exception or a silent `NaN`.
|
|
49
|
+
|
|
50
|
+
Its one big idea: **partiality is first-class**. A geometric question with no answer (a point in a
|
|
51
|
+
frame that was never placed, a direction from a zero-length vector, a marker occluded mid-capture)
|
|
52
|
+
is an honest `Unresolvable` *with an explanation that propagates through everything built on top of
|
|
53
|
+
it* — never a crash, never an invented number.
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from fungeom import Point3, Frame, Resolvable, Unresolvable
|
|
57
|
+
|
|
58
|
+
gripper = Frame.detached("gripper") # a sub-assembly, not yet placed in the world
|
|
59
|
+
tip = Point3.at(0, 0, 0.1, frame=gripper) # a point in the gripper's frame — built lazily
|
|
60
|
+
|
|
61
|
+
match tip.decide(): # ask whether it can be resolved...
|
|
62
|
+
case Resolvable(point): print(point.coord)
|
|
63
|
+
case Unresolvable(why): print(why) # "frame 'gripper' is not grounded to the world"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Nothing above is computed until you ask. `decide()` returns *evidence* — the value if it resolves,
|
|
67
|
+
or the reason if it doesn't — and `resolve()` is just `decide().unwrap()`, so the two can never
|
|
68
|
+
disagree.
|
|
69
|
+
|
|
70
|
+
## Why fungeom
|
|
71
|
+
|
|
72
|
+
- **Decidable, not crash-prone.** Every resolver answers `decide()` → `Resolvable(value)` or
|
|
73
|
+
`Unresolvable(reason)`. Partiality propagates: a midpoint is resolvable only if both ends are, and
|
|
74
|
+
the *reason* flows across type boundaries unchanged.
|
|
75
|
+
- **Lazy & immutable.** Geometry is a graph of frozen values; every op returns a new node and
|
|
76
|
+
computes nothing until `decide()`/`resolve()`. You can even [render the graph](docs/reference.md#seeing-the-graph)
|
|
77
|
+
to *see* where an unresolvability lives.
|
|
78
|
+
- **Everything is a resolver — even scalars.** A scale factor, an interpolation parameter, a
|
|
79
|
+
vector's norm are all first-class nodes, so values flow across types and dividing by a
|
|
80
|
+
resolves-to-zero scalar is `Unresolvable`, not a runtime error.
|
|
81
|
+
- **One class per primitive.** You both *construct from* it (classmethods like `Vec3.of`,
|
|
82
|
+
`Point3.at`) and *compose with* it (fluent methods like `a.midpoint(b)`). No builders, no visitors.
|
|
83
|
+
|
|
84
|
+
## Install
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uv pip install -e '.[dev]' # from a checkout (dev extras: ruff, mypy, pytest)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Requires Python 3.13+. Runtime deps: `numpy`, `scipy`, `rich`, `shapely`.
|
|
91
|
+
|
|
92
|
+
## The surface, at a glance
|
|
93
|
+
|
|
94
|
+
| Layer | Primitives | What it's for |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| **Geometry** | `Scalar`, `Vec2/3`, `Direction3`, `Transform`, `Frame`, `Point3`, `Plane`, `Line`, `Ray`, `Segment` (+ 2D siblings) | points, frames, rigid motion — the classic kit, made decidable |
|
|
97
|
+
| **Logic** | `Bool` | three-valued predicates with strict propagation |
|
|
98
|
+
| **Time** | `Duration`, `Instant`, `Interval`, `Coverage`, `Timeline`, `Sampling`, `TimeMap`, `TimeWarp` | durations, clocks, gappy supports, alignment |
|
|
99
|
+
| **Signals** | `ScalarSignal`, `Vec3Signal`, …, `PlaneSignal`, `BoolSignal` | values that vary over time — partial functions of a clock |
|
|
100
|
+
| **Collections** | `…Bundle`, `…BundleSignal`, `Roster`, `RosterMap` | keyed sets (marker clouds) and sets-over-time, occlusion-aware |
|
|
101
|
+
| **Regions** | `Region2`, `Face`, `Point2Bundle` | bounded planar areas, the balance margin, bounded contact patches |
|
|
102
|
+
|
|
103
|
+
The **complete combinator table** (every constructor, every op, and its exact partiality) lives in
|
|
104
|
+
[`docs/reference.md`](docs/reference.md).
|
|
105
|
+
|
|
106
|
+
## A taste — contact detection, end to end
|
|
107
|
+
|
|
108
|
+
Everything composes and stays lazy. Here is the spine of a real motion-capture task — *when is a
|
|
109
|
+
foot in contact with the ground?* — built without ever inventing a number:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
clearances = ground_cloud.fit_plane().signed_distance(foot_cloud) # per-marker height, over time
|
|
113
|
+
contact = clearances.min().le(0.0) # a three-valued BoolSignal
|
|
114
|
+
print(contact.when_true().resolve()) # the contact interval(s)
|
|
115
|
+
print(contact.first_true().resolve()) # touchdown
|
|
116
|
+
print(contact.last_true().resolve()) # release
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
If a marker drops out, the predicate is `Unresolvable` there — *undefined*, never silently `False`.
|
|
120
|
+
See [`examples/10_contact_over_time.py`](examples/10_contact_over_time.py) for the runnable version.
|
|
121
|
+
|
|
122
|
+
## Examples
|
|
123
|
+
|
|
124
|
+
Runnable, commented scripts in [`examples/`](examples/) (each is exercised by the test suite, so
|
|
125
|
+
they stay current). Start at the top and work down:
|
|
126
|
+
|
|
127
|
+
| Script | Shows |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| [`01_quickstart`](examples/01_quickstart.py) | construct → compose → resolve; scalars flowing across types |
|
|
130
|
+
| [`02_coordinate_frames`](examples/02_coordinate_frames.py) | a kinematic chain; grounding, and why an unplaced frame is `Unresolvable` |
|
|
131
|
+
| [`03_decidability_and_partiality`](examples/03_decidability_and_partiality.py) | value-dependent partialities, reasons, propagation; predicates as decidable `Bool`s |
|
|
132
|
+
| [`04_visualizing_resolvers`](examples/04_visualizing_resolvers.py) | rendering the lazy graph to *see* where an unresolvability lives |
|
|
133
|
+
| [`05_time_and_clocks`](examples/05_time_and_clocks.py) | the temporal layer: durations/instants, intervals & coverage with gaps |
|
|
134
|
+
| [`06_signals_over_time`](examples/06_signals_over_time.py) | signals as partial functions of time; `at`/`resample`/`reparameterize`; slerp on a manifold |
|
|
135
|
+
| [`07_aligning_and_warping`](examples/07_aligning_and_warping.py) | recovering the time map between two recordings from landmarks |
|
|
136
|
+
| [`08_point_clouds_over_time`](examples/08_point_clouds_over_time.py) | a `Point3Bundle` and a cloud over time — an occluded marker is honestly `Unresolvable` |
|
|
137
|
+
| [`09_regions_and_patches`](examples/09_regions_and_patches.py) | the 2D region algebra, the balance margin, and a bounded-patch `Face` |
|
|
138
|
+
| [`10_contact_over_time`](examples/10_contact_over_time.py) | the contact spine end-to-end; touchdown & release from marker data |
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
python examples/01_quickstart.py
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Learn more
|
|
145
|
+
|
|
146
|
+
- **[Wiki](https://github.com/ryanrudes/fungeom/wiki)** — narrative guides: the core concepts, each
|
|
147
|
+
layer, and how to add a primitive.
|
|
148
|
+
- **[`docs/reference.md`](docs/reference.md)** — the complete combinator table, architecture, and
|
|
149
|
+
design notes.
|
|
150
|
+
- **Deep dives** — [`docs/time.md`](docs/time.md), [`docs/collections.md`](docs/collections.md),
|
|
151
|
+
[`docs/regions.md`](docs/regions.md).
|
|
152
|
+
|
|
153
|
+
## Development
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
uv pip install -e '.[dev]'
|
|
157
|
+
pytest --cov=fungeom # tests + 100% coverage gate
|
|
158
|
+
ruff check . && ruff format --check .
|
|
159
|
+
mypy # strict
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
CI runs all four on every push; the same checks are available as pre-commit hooks
|
|
163
|
+
(`pre-commit install && pre-commit install --hook-type pre-push`). Every primitive and combinator,
|
|
164
|
+
with the checks it has passed, is tracked in [`CHECKLIST.md`](CHECKLIST.md).
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
[Apache-2.0](LICENSE).
|
fungeom-0.1.0/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<h1 align="center">fungeom</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center"><em>Functional geometry as an immutable, decidable resolver graph.</em></p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/ryanrudes/fungeom/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/ryanrudes/fungeom/actions/workflows/ci.yml/badge.svg"></a>
|
|
7
|
+
<img alt="Python 3.13+" src="https://img.shields.io/badge/python-3.13%2B-blue">
|
|
8
|
+
<img alt="Coverage 100%" src="https://img.shields.io/badge/coverage-100%25-brightgreen">
|
|
9
|
+
<img alt="License Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-lightgrey">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
fungeom is a Python library for building geometry as a **lazy, immutable graph** you can *reason
|
|
15
|
+
about before you compute it*. You compose points, vectors, frames, transforms, time-signals, and
|
|
16
|
+
regions; ask whether the result **can** be resolved; and — when it can't — get back a *reason*,
|
|
17
|
+
not an exception or a silent `NaN`.
|
|
18
|
+
|
|
19
|
+
Its one big idea: **partiality is first-class**. A geometric question with no answer (a point in a
|
|
20
|
+
frame that was never placed, a direction from a zero-length vector, a marker occluded mid-capture)
|
|
21
|
+
is an honest `Unresolvable` *with an explanation that propagates through everything built on top of
|
|
22
|
+
it* — never a crash, never an invented number.
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
from fungeom import Point3, Frame, Resolvable, Unresolvable
|
|
26
|
+
|
|
27
|
+
gripper = Frame.detached("gripper") # a sub-assembly, not yet placed in the world
|
|
28
|
+
tip = Point3.at(0, 0, 0.1, frame=gripper) # a point in the gripper's frame — built lazily
|
|
29
|
+
|
|
30
|
+
match tip.decide(): # ask whether it can be resolved...
|
|
31
|
+
case Resolvable(point): print(point.coord)
|
|
32
|
+
case Unresolvable(why): print(why) # "frame 'gripper' is not grounded to the world"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Nothing above is computed until you ask. `decide()` returns *evidence* — the value if it resolves,
|
|
36
|
+
or the reason if it doesn't — and `resolve()` is just `decide().unwrap()`, so the two can never
|
|
37
|
+
disagree.
|
|
38
|
+
|
|
39
|
+
## Why fungeom
|
|
40
|
+
|
|
41
|
+
- **Decidable, not crash-prone.** Every resolver answers `decide()` → `Resolvable(value)` or
|
|
42
|
+
`Unresolvable(reason)`. Partiality propagates: a midpoint is resolvable only if both ends are, and
|
|
43
|
+
the *reason* flows across type boundaries unchanged.
|
|
44
|
+
- **Lazy & immutable.** Geometry is a graph of frozen values; every op returns a new node and
|
|
45
|
+
computes nothing until `decide()`/`resolve()`. You can even [render the graph](docs/reference.md#seeing-the-graph)
|
|
46
|
+
to *see* where an unresolvability lives.
|
|
47
|
+
- **Everything is a resolver — even scalars.** A scale factor, an interpolation parameter, a
|
|
48
|
+
vector's norm are all first-class nodes, so values flow across types and dividing by a
|
|
49
|
+
resolves-to-zero scalar is `Unresolvable`, not a runtime error.
|
|
50
|
+
- **One class per primitive.** You both *construct from* it (classmethods like `Vec3.of`,
|
|
51
|
+
`Point3.at`) and *compose with* it (fluent methods like `a.midpoint(b)`). No builders, no visitors.
|
|
52
|
+
|
|
53
|
+
## Install
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
uv pip install -e '.[dev]' # from a checkout (dev extras: ruff, mypy, pytest)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Requires Python 3.13+. Runtime deps: `numpy`, `scipy`, `rich`, `shapely`.
|
|
60
|
+
|
|
61
|
+
## The surface, at a glance
|
|
62
|
+
|
|
63
|
+
| Layer | Primitives | What it's for |
|
|
64
|
+
| --- | --- | --- |
|
|
65
|
+
| **Geometry** | `Scalar`, `Vec2/3`, `Direction3`, `Transform`, `Frame`, `Point3`, `Plane`, `Line`, `Ray`, `Segment` (+ 2D siblings) | points, frames, rigid motion — the classic kit, made decidable |
|
|
66
|
+
| **Logic** | `Bool` | three-valued predicates with strict propagation |
|
|
67
|
+
| **Time** | `Duration`, `Instant`, `Interval`, `Coverage`, `Timeline`, `Sampling`, `TimeMap`, `TimeWarp` | durations, clocks, gappy supports, alignment |
|
|
68
|
+
| **Signals** | `ScalarSignal`, `Vec3Signal`, …, `PlaneSignal`, `BoolSignal` | values that vary over time — partial functions of a clock |
|
|
69
|
+
| **Collections** | `…Bundle`, `…BundleSignal`, `Roster`, `RosterMap` | keyed sets (marker clouds) and sets-over-time, occlusion-aware |
|
|
70
|
+
| **Regions** | `Region2`, `Face`, `Point2Bundle` | bounded planar areas, the balance margin, bounded contact patches |
|
|
71
|
+
|
|
72
|
+
The **complete combinator table** (every constructor, every op, and its exact partiality) lives in
|
|
73
|
+
[`docs/reference.md`](docs/reference.md).
|
|
74
|
+
|
|
75
|
+
## A taste — contact detection, end to end
|
|
76
|
+
|
|
77
|
+
Everything composes and stays lazy. Here is the spine of a real motion-capture task — *when is a
|
|
78
|
+
foot in contact with the ground?* — built without ever inventing a number:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
clearances = ground_cloud.fit_plane().signed_distance(foot_cloud) # per-marker height, over time
|
|
82
|
+
contact = clearances.min().le(0.0) # a three-valued BoolSignal
|
|
83
|
+
print(contact.when_true().resolve()) # the contact interval(s)
|
|
84
|
+
print(contact.first_true().resolve()) # touchdown
|
|
85
|
+
print(contact.last_true().resolve()) # release
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If a marker drops out, the predicate is `Unresolvable` there — *undefined*, never silently `False`.
|
|
89
|
+
See [`examples/10_contact_over_time.py`](examples/10_contact_over_time.py) for the runnable version.
|
|
90
|
+
|
|
91
|
+
## Examples
|
|
92
|
+
|
|
93
|
+
Runnable, commented scripts in [`examples/`](examples/) (each is exercised by the test suite, so
|
|
94
|
+
they stay current). Start at the top and work down:
|
|
95
|
+
|
|
96
|
+
| Script | Shows |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| [`01_quickstart`](examples/01_quickstart.py) | construct → compose → resolve; scalars flowing across types |
|
|
99
|
+
| [`02_coordinate_frames`](examples/02_coordinate_frames.py) | a kinematic chain; grounding, and why an unplaced frame is `Unresolvable` |
|
|
100
|
+
| [`03_decidability_and_partiality`](examples/03_decidability_and_partiality.py) | value-dependent partialities, reasons, propagation; predicates as decidable `Bool`s |
|
|
101
|
+
| [`04_visualizing_resolvers`](examples/04_visualizing_resolvers.py) | rendering the lazy graph to *see* where an unresolvability lives |
|
|
102
|
+
| [`05_time_and_clocks`](examples/05_time_and_clocks.py) | the temporal layer: durations/instants, intervals & coverage with gaps |
|
|
103
|
+
| [`06_signals_over_time`](examples/06_signals_over_time.py) | signals as partial functions of time; `at`/`resample`/`reparameterize`; slerp on a manifold |
|
|
104
|
+
| [`07_aligning_and_warping`](examples/07_aligning_and_warping.py) | recovering the time map between two recordings from landmarks |
|
|
105
|
+
| [`08_point_clouds_over_time`](examples/08_point_clouds_over_time.py) | a `Point3Bundle` and a cloud over time — an occluded marker is honestly `Unresolvable` |
|
|
106
|
+
| [`09_regions_and_patches`](examples/09_regions_and_patches.py) | the 2D region algebra, the balance margin, and a bounded-patch `Face` |
|
|
107
|
+
| [`10_contact_over_time`](examples/10_contact_over_time.py) | the contact spine end-to-end; touchdown & release from marker data |
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
python examples/01_quickstart.py
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Learn more
|
|
114
|
+
|
|
115
|
+
- **[Wiki](https://github.com/ryanrudes/fungeom/wiki)** — narrative guides: the core concepts, each
|
|
116
|
+
layer, and how to add a primitive.
|
|
117
|
+
- **[`docs/reference.md`](docs/reference.md)** — the complete combinator table, architecture, and
|
|
118
|
+
design notes.
|
|
119
|
+
- **Deep dives** — [`docs/time.md`](docs/time.md), [`docs/collections.md`](docs/collections.md),
|
|
120
|
+
[`docs/regions.md`](docs/regions.md).
|
|
121
|
+
|
|
122
|
+
## Development
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
uv pip install -e '.[dev]'
|
|
126
|
+
pytest --cov=fungeom # tests + 100% coverage gate
|
|
127
|
+
ruff check . && ruff format --check .
|
|
128
|
+
mypy # strict
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
CI runs all four on every push; the same checks are available as pre-commit hooks
|
|
132
|
+
(`pre-commit install && pre-commit install --hook-type pre-push`). Every primitive and combinator,
|
|
133
|
+
with the checks it has passed, is tracked in [`CHECKLIST.md`](CHECKLIST.md).
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
[Apache-2.0](LICENSE).
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.25", "hatch-vcs>=0.4"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fungeom"
|
|
7
|
+
dynamic = ["version"] # derived from the latest vX.Y.Z git tag (hatch-vcs)
|
|
8
|
+
description = "Functional geometry as an immutable, decidable resolver graph."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.13"
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
|
+
authors = [{ name = "Ryan Rudes" }]
|
|
13
|
+
keywords = ["geometry", "functional", "transforms", "frames", "decidability"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: Apache Software License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Mathematics",
|
|
21
|
+
"Typing :: Typed",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"numpy>=2.4.6",
|
|
25
|
+
"scipy>=1.17.1",
|
|
26
|
+
"rich>=15.0.0",
|
|
27
|
+
"shapely>=2.0.0",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
dev = [
|
|
32
|
+
"pytest>=8.2",
|
|
33
|
+
"pytest-cov>=5.0",
|
|
34
|
+
"ruff>=0.6",
|
|
35
|
+
"mypy>=1.11",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Repository = "https://github.com/ryanrudes/fungeom"
|
|
40
|
+
Documentation = "https://github.com/ryanrudes/fungeom/wiki"
|
|
41
|
+
Issues = "https://github.com/ryanrudes/fungeom/issues"
|
|
42
|
+
Changelog = "https://github.com/ryanrudes/fungeom/blob/main/CHANGELOG.md"
|
|
43
|
+
|
|
44
|
+
# Version comes from git tags (hatch-vcs). No tag yet -> fall back to the baseline below, so a
|
|
45
|
+
# tag-less checkout still builds; once a `vX.Y.Z` tag exists it drives the version exactly.
|
|
46
|
+
[tool.hatch.version]
|
|
47
|
+
source = "vcs"
|
|
48
|
+
fallback-version = "0.1.0"
|
|
49
|
+
|
|
50
|
+
[tool.hatch.build.targets.wheel]
|
|
51
|
+
packages = ["src/fungeom"]
|
|
52
|
+
|
|
53
|
+
[tool.hatch.build.targets.sdist]
|
|
54
|
+
include = ["src/fungeom", "README.md", "LICENSE", "CHANGELOG.md"]
|
|
55
|
+
|
|
56
|
+
[tool.ruff]
|
|
57
|
+
line-length = 120
|
|
58
|
+
target-version = "py313"
|
|
59
|
+
exclude = [".venv"]
|
|
60
|
+
|
|
61
|
+
[tool.mypy]
|
|
62
|
+
python_version = "3.13"
|
|
63
|
+
files = ["src/fungeom", "examples"]
|
|
64
|
+
strict = true
|
|
65
|
+
warn_unreachable = true
|
|
66
|
+
warn_unused_ignores = true
|
|
67
|
+
|
|
68
|
+
[[tool.mypy.overrides]]
|
|
69
|
+
module = ["scipy.*", "shapely.*"]
|
|
70
|
+
ignore_missing_imports = true
|
|
71
|
+
|
|
72
|
+
[tool.pytest.ini_options]
|
|
73
|
+
addopts = "-q --import-mode=importlib"
|
|
74
|
+
testpaths = ["tests"]
|
|
75
|
+
pythonpath = ["src"]
|
|
76
|
+
|
|
77
|
+
[tool.coverage.run]
|
|
78
|
+
source = ["fungeom"]
|
|
79
|
+
|
|
80
|
+
[tool.coverage.report]
|
|
81
|
+
show_missing = true
|
|
82
|
+
fail_under = 100
|
|
83
|
+
exclude_also = [
|
|
84
|
+
"if TYPE_CHECKING:",
|
|
85
|
+
]
|